moveCursorWordRight method
void
moveCursorWordRight()
Moves the cursor one word to the right.
Implementation
void moveCursorWordRight() {
if (_cursorPosition >= _text.length) return;
int pos = _cursorPosition;
while (pos < _text.length && _text[pos] == ' ') {
pos++;
}
while (pos < _text.length && _text[pos] != ' ') {
pos++;
}
while (pos < _text.length && _text[pos] == ' ') {
pos++;
}
_cursorPosition = pos;
clearSelection();
notifyListeners();
}