addSelection method

UserSelectionState addSelection(
  1. UserSelectionModel newSelection
)

Add a new selection to the end of selections.

Implementation

UserSelectionState addSelection(
  UserSelectionModel newSelection,
) {
  final newSelections =
      selections.rebuild((builder) => builder.add(newSelection));

  return UserSelectionState._(newSelections);
}