moveCursorToEnd method
Moves cursor to the end of the text
Implementation
void moveCursorToEnd() {
// only moves the cursor if text is not selected
if (selection.baseOffset == selection.extentOffset) {
selection = TextSelection.fromPosition(
TextPosition(offset: (_lastUpdatedText ?? '').length),
);
}
}