setSelection method
CalendarState
setSelection(
- CalendarSelection val, {
- CausedBy cause = CausedBy.external,
- bool previewAnchoredAtStart = false,
Updates the value for the given selection. Creates it if it's not in the list of selections already.
Implementation
CalendarState setSelection(CalendarSelection val,
{CausedBy cause = CausedBy.external,
bool previewAnchoredAtStart = false}) {
var newSelections = [val]..addAll(selections.where((s) => s.id != val.id));
return CalendarState(
selections: newSelections,
currentSelection: currentSelection,
cause: cause,
previewAnchoredAtStart: previewAnchoredAtStart,
resolution: resolution);
}