selection property

  1. @override
SelectionModel<T> get selection
override

The selection model this item is a member of.

Implementation

@override
SelectionModel<T> get selection => _selection;
  1. @Input()
  2. @override
set selection (SelectionModel<T> sel)
override

Selection model to update with changes.

Implementation

@Input()
@override
set selection(SelectionModel<T> sel) {
  _selection = sel;
  _supportsMultiSelect = sel is MultiSelectionModel<T>;

  // Eventually change this component to onpush. This should be step in that
  // direction to support onpush components that use this component. There may
  // be other mutable state that needs to trigger change detection.
  _selectionChangeStreamSub?.cancel();
  _selectionChangeStreamSub = sel.selectionChanges.listen((_) {
    _cdRef.markForCheck();
  });
}