DropdownController<T>.single constructor
DropdownController<T>.single ({
- bool? unselectable,
- List<
DropdownItem< ? items,T> >
A single selection dropdown controller.
unselectable
indicates whether the selected item can be unselected,
if true, either tapping the same selected item or select null item will unselect it;
otherwise, it will be ignored.
Only one item can be selected at a time.
Implementation
factory DropdownController.single({
// Default is false.
bool? unselectable,
/// The initial items that will be shown in the dropdown menu,
/// but you can only set one of them as selected.
List<DropdownItem<T>>? items,
}) = SingleSelectionDropdownController;