moveToDocumentStart method

bool moveToDocumentStart()

Moves the primary cursor to the start of the document.

Implementation

bool moveToDocumentStart() {
  if (cursorOffset == 0 && !hasSelection && !hasMultipleSelections) {
    return false;
  }
  setSelections(TextSelectionSet.collapsed(0));
  return true;
}