setSelection method

void setSelection(
  1. int start,
  2. int end
)

Implementation

void setSelection(int start, int end) {
  _selectionStart = start.clamp(0, _text.length);
  _selectionEnd = end.clamp(_selectionStart!, _text.length);
  notifyListeners();
}