selection property

TextSelection selection

Implementation

TextSelection get selection => value.selection;
void selection=(TextSelection newSelection)

Implementation

set selection(TextSelection newSelection) {
  if (newSelection.start > text.length || newSelection.end > text.length)
    throw FlutterError('invalid text selection: $newSelection');
  value = value.copyWith(selection: newSelection, composing: TextRange.empty);
}