selection property

TextSelection get selection

Current selection.

Implementation

TextSelection get selection => value.selection;
set selection (TextSelection selection)

Updates selection without changing text.

Implementation

set selection(TextSelection selection) {
  _validateSelection(selection, text);
  value = value.copyWith(selection: selection);
}