addSelection method

void addSelection({
  1. required Position anchor,
  2. Position? head,
})

Adds a new selection to the existing set of selections, and makes it the primary selection.

Implementation

void addSelection({required Position anchor, Position? head}) {
  head ??= anchor;
  callArgs('addSelection', [anchor.toProxy(), head.toProxy()]);
}