Support text selection programmatically for the SelectableText widget #69460
Labels
a: text input
Entering text in a text field or keyboard related problems
c: proposal
A detailed proposal for a change to Flutter
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Flutter currently does not provide a way to select text programmatically for the SelectableText widget.
On Android we do that using the
Spannable
API, see https://stackoverflow.com/a/41760489/9185192On iOS we a property to define a selection range, see https://developer.apple.com/documentation/uikit/uitextview/1618615-selectedrange
Proposal
It would be great to have this capability in Flutter to help native developers easily migrate their apps to Flutter. I suggest to have this capability on
SelectableText
widget since it is the only one text visualizer that support text selection.The text was updated successfully, but these errors were encountered: