textMoveToDocumentBoundary function
TextCursorCommandResult
textMoveToDocumentBoundary({
- required TextDocument document,
- required TextOffsetStateSnapshot state,
- required bool forward,
- bool extendSelection = false,
- bool clearSelection = false,
Implementation
TextCursorCommandResult textMoveToDocumentBoundary({
required TextDocument document,
required TextOffsetStateSnapshot state,
required bool forward,
bool extendSelection = false,
bool clearSelection = false,
}) {
return moveCursorToOffset(
textLength: document.length,
cursorOffset: state.cursorOffset,
selectionBaseOffset: state.selectionBaseOffset,
selectionExtentOffset: state.selectionExtentOffset,
targetOffset: forward ? document.length : 0,
extendSelection: extendSelection,
clearSelection: clearSelection,
);
}