setSelection method
Sets the selection range from start to end.
Implementation
void setSelection(int start, int end) {
_selectionStart = start.clamp(0, _text.length);
_selectionEnd = end.clamp(_selectionStart!, _text.length);
notifyListeners();
}