startSelection method

void startSelection(
  1. int col,
  2. int row, {
  3. SelectionMode mode = SelectionMode.character,
  4. SelectionRegion? region,
})

Begins a new selection starting at (col, row).

If region is provided, selection coordinates are clamped and confined to that region.

Implementation

void startSelection(
  int col,
  int row, {
  SelectionMode mode = SelectionMode.character,
  SelectionRegion? region,
}) {
  _mode = mode;
  _region = region;
  _anchor = _clampPoint(col, row, region);
  _focus = null;
  _wordAnchor = null;
  notifyListeners();
}