setCursor method

void setCursor(
  1. int offset
)

Sets a specific cursor position in the text

Implementation

void setCursor(int offset) {
  selection = TextSelection.collapsed(offset: offset);
}