resetSelectionsToACellSelection method
UserSelectionState
resetSelectionsToACellSelection({
- required IntVector2 anchor,
- required IntVector2 focus,
Reset all selections to a single CellUserSelectionModel created from
anchor
and focus
.
The resulting lone selection copies everything from the primarySelection
besides anchor
and focus
.
Implementation
UserSelectionState resetSelectionsToACellSelection({
required IntVector2 anchor,
required IntVector2 focus,
}) {
final newList = BuiltList<UserSelectionModel>.from(
<UserSelectionModel>[
CellUserSelectionModel.fromSelectionModel(
primarySelection,
anchor: anchor,
focus: focus,
),
],
);
return UserSelectionState._(newList);
}