-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Make 'Selectable' to support getBoxesForSelection (TextSelection) #137371
Copy link
Copy link
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Needs Update
Is there an existing issue for this?
Use case
I would like to be able to use SelectableArea to layout my fixed position text, however, I still need to gather the Rects from the text to run my custom highlighting code.
Proposal
I would appreciate it if 'Selectable' were to offer getBoxesForSelection (TextSelection). After a preliminary search of the source code, it would seem as though all of the different pieces of data is there, it would be a matter of tying it all the pieces together in order to cleanly return the Rects from a given TextSelection. I'd be willing to work on this as well, but I would need a little direction and recommendation on where to start. My current issue is I'm unsure in the SelectableRegion/Area exists the ability to look through all the children who are Selectable.