setSelection method
- FinderBase<
SemanticsNode> finder, { - required int base,
- 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:
- The given
finderreturns zero or more than one result. - The SemanticsNode found with
finderdoes not support SemanticsAction.setSelection.
Implementation
void setSelection(
finders.FinderBase<SemanticsNode> finder, {
required int base,
required int extent,
}) {
performAction(
finder,
SemanticsAction.setSelection,
args: <String, int>{'base': base, 'extent': extent},
);
}