Skip to content

[Android] Add 'Share' button to selection controls #138728

@bleroux

Description

@bleroux

Is there an existing issue for this?

Use case

A native Android app shows the 'Share' option in the selection context menu (before 'Select all') :

For a TextField:
Capture d’écran du 2023-11-20 17-19-02

For a TextView:
Capture d’écran du 2023-11-20 17-19-23

Proposal

On Android, add the 'Share' option to the Flutter selection menu (both for Selectable region and TextField).

This is part of #107578 which is very broad (all plaforms and all missing menu options).
Creating this issue to make it easier to follow.

Implementation steps

The 'share' feature is already supported on iOS (see #132599 and flutter/engine#44554), the steps to support it on Android are:

# Status Description Related Work
1 Done Add Android support for the PlatformChannel Share.invoke message (engine side). flutter/engine#48265
2 Done Change the Share... label to Share in material_localizations.dart (Android native label does not have the same ... that iOS native label has). #138899
3 Done Add the share option to the selection menu for EditableText (it should be displayed when there is some text selected and it should appears before Select all. #139479
4 Done Add the share option to the selection menu for SelectionRegion #141447

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: fidelityMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions