MultiSelectionDropdownController<T> constructor

MultiSelectionDropdownController<T>({
  1. bool? unselectable,
  2. List<DropdownItem<T>>? items,
})

Implementation

MultiSelectionDropdownController({
  bool? unselectable,
  List<DropdownItem<T>>? items,
}) : super(unselectable ?? false) {
  if (items != null) {
    for (final item in items) {
      if (item.selected) {
        _selectedItems.add(item.value);
      }
      _itemValues.add(item.value);
    }
  }
}