Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
By default, Flutter's text selection toolbar shows cut, copy, paste, and select all. However, on native platforms, other buttons appear by default.
| Platform | Screenshot | Missing | Related Work |
|---|---|---|---|
| Android | ![]() |
Translate, Share, Web Search | Share: #138728 Custom buttons: #139361 |
| iOS | ![]() |
Select, Replace, Translate, unit conversion | Look up: #130532, flutter-team-archive/engine#43308. Search web: flutter-team-archive/engine#43324, #131898, Share: flutter-team-archive/engine#44554 |
| Linux | ![]() |
Undo, Redo, Delete, Insert Emoji, Change Case | |
| Mac | ![]() |
Look Up "asdf", Translate "asdf", Search With Google, Share | |
| Windows | ![]() |
Undo, Delete, Right to left Reading order, Show Unicode control characters, Insert Unicode control character, Open IME, Reconversion, Search with Bing |
Open questions
How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app? (edit: -> #107603)
Related
Reacted by osama, Metin Ur, ohampro, Ali Yousefi, Greg Price, mono — Masayuki Ono, Renan, Steve, Jonathan Cole, TainakaDrums and 14 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team






Activity
[-]Match the default native text selection toolbar buttons[/-][+]Some default buttons are missing from the text selection toolbars[/+]osaxma commentedon Jul 27, 2022
Hi @justinmc,
The ability to add custom buttons for app specific functionality should also be considered. For instance, Twitter has "mute" and "search" buttons which are app specific which can be seen when a text is selected. It'd be useful if the developer can add such buttons by providing a list of Strings and their respective callbacks.
By the way, the table is missing some buttons for iOS and Android:
For iOS, the following buttons are not mentioned: Replace, Lookup, Translate, and Share (they appear when text is selected)
For Android, "Web Search" isn't mentioned (Maybe it's not appearing in the screenshot because it's taken from within the browser)
justinmc commentedon Aug 8, 2022
@osaxma You're in luck for custom app-specific context menu buttons, I have a PR open for that right now: #107193
And thank you for calling out those missing buttons! I've updated the table to include them.
bksubhuti commentedon Dec 18, 2022
we are dealing with this now as well.
One monk showed me what we are missing as pictured in op
Since we are vocabulary intensive reading app, we would also like anki.
(tipitaka pali reader)
bar4488 commentedon Jan 24, 2023
The lack of buttons in text selection is critical for native like experience. In android, developers can add floating text selection toolbar actions that will show in every native app through the
ACTION_PROCESS_TEXTintent. We should show these options in flutter apps as well.greggman commentedon Feb 9, 2023
Other standard iOS options
The bigger issue here is not just to add the buttons. It's that the system itself provides them. If iOS 18 or Android 14 adds "ask ChatGPT" and "Generate AI video" and "find related photos" as standard options, it should not require every Flutter app in existance to rebuild with a newer version of flutter and re-go through the app-store approval process for that option to appear on the context menu.
gnprice commentedon Feb 15, 2023
As an Android user I find the "Translate" button in particular to be extremely useful, any time I'm reading text in a language other than English. (Even if I know the language moderately well, I'll use it regularly for words and phrases I don't understand.) When it's missing in a given app, if it's any app that's heavy on reading text, I'll notice and it's disappointing.
So as a developer I imagine many of my users value it too.
I believe the "Translate" button is actually another example in this category, though (aka #107603):
in that I believe it's added by the Google Translate app. (Other translation apps like DeepL add their own text selection buttons, too.) So supporting this category would be especially appreciated.
28 remaining items
flutter-triage-bot commentedon Jan 12, 2024
This issue is assigned to @LouiseHsu but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
LouiseHsu commentedon Jun 12, 2024
Translate as a default context menu button for iOS can probably be added now with the new Translation api announced during wwdc24 https://developer.apple.com/documentation/Translation
pagetronic commentedon Jul 27, 2024
[Framework] Add Share to selection controls (#132599)
[Framework] Add Share to selection controls (#132599)
[Framework] Add Share to selection controls (#132599)
[Framework] Add Share to selection controls (#132599)
Add share to selection controls (flutter-team-archive/engine#44554)