pressDocumentEndKey method
Moves the cursor to the end of the document.
If isShiftPressed is true, extends the selection to the document end.
Implementation
void pressDocumentEndKey({bool isShiftPressed = false}) {
final endOffset = length;
if (isShiftPressed) {
setSelectionSilently(
TextSelection(
baseOffset: selection.baseOffset,
extentOffset: endOffset,
),
);
} else {
setSelectionSilently(TextSelection.collapsed(offset: endOffset));
}
}