moveToDocumentEnd method
Moves the primary cursor to the end of the document.
Implementation
bool moveToDocumentEnd() {
if (cursorOffset == length && !hasSelection && !hasMultipleSelections) {
return false;
}
setSelections(TextSelectionSet.collapsed(length));
return true;
}