addCursorAtOffset method

void addCursorAtOffset(
  1. int offset
)

Adds a collapsed cursor at offset and makes it primary.

Implementation

void addCursorAtOffset(int offset) {
  setSelections(
    selections.add(
      TextSelectionRange(
        startOffset: offset.clamp(0, length),
        endOffset: offset.clamp(0, length),
      ),
    ),
  );
}