SelectionModel<T>.single constructor

SelectionModel<T>.single({
  1. T? selected,
  2. KeyProvider<T>? keyProvider,
})

Creates a single-selection model.

keyProvider is used for equality checking. For example, select will only alter the selected value if the key of the new value does not equal the key of the already selected value.

Implementation

factory SelectionModel.single({T? selected, KeyProvider<T>? keyProvider}) =
    SingleSelectionModel<T>;