selection property
TextSelection
selection
The currently selected text.
If the selection is collapsed, then this property gives the offset of the cursor within the text.
Implementation
TextSelection get selection => _textFieldController.selection;
Implementation
set selection(TextSelection newSelection) {
_textFieldController.selection = selection;
}