selectionInput property

  1. @Input('selection')
set selectionInput (dynamic value)

Sets the selected value or selection model for the selection component.

Accepts either a SelectionModel, a selected value or null.

Implementation

@Input('selection')
set selectionInput(dynamic value) {
  if (value is SelectionModel<T>) {
    selection = value;
    return;
  }
  _initSelectionModel();
  if (value == null) {
    selection.clear();
  } else {
    assert(
        selection is SingleSelectionModel<T?>,
        'Passing selected value through `selection` input is only supported '
        'for single select.');
    selection.select(value);
  }
}