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