SelectionController constructor

SelectionController({
  1. bool multiSelect = false,
  2. Set<int>? initialSelection,
})

Creates a selection controller.

multiSelect determines if multiple items can be selected. initialSelection pre-selects the given indices.

Implementation

SelectionController({
  this.multiSelect = false,
  Set<int>? initialSelection,
}) : _selected = {...?initialSelection};