setSelection method

void setSelection(
  1. FinderBase<SemanticsNode> finder, {
  2. required int base,
  3. required int extent,
})

Performs a SemanticsAction.setSelection action on the SemanticsNode found by finder.

The base parameter is the start index of selection, and the extent parameter is the length of the selection. Each value should be limited between 0 and the length of the found SemanticsNode's value.

Throws a StateError if:

Implementation

void setSelection(
  finders.FinderBase<SemanticsNode> finder, {
  required int base,
  required int extent
}) {
  performAction(
    finder,
    SemanticsAction.setSelection,
    args: <String, int>{'base': base, 'extent': extent},
  );
}