MultiItemDropper<T> constructor
const
MultiItemDropper<T> ({
- Key? key,
- required List<
ItemDropperItem< items,T> > - List<
ItemDropperItem< ? selectedItems,T> > - required void onChanged(
- List<
ItemDropperItem< T> >
- List<
- Widget popupItemBuilder()?,
- required double width,
- bool enabled = true,
- String? hintText,
- int? maxSelected,
- ItemDropperItem<
T> ? onAddItem(- String searchText
- void onDeleteItem(
- ItemDropperItem<
T> item
- ItemDropperItem<
- GlobalKey<
State< ? inputKey,StatefulWidget> > - double maxDropdownHeight = MultiSelectConstants.kDefaultMaxDropdownHeight,
- bool showScrollbar = true,
- double scrollbarThickness = ItemDropperConstants.kDefaultScrollbarThickness,
- double? itemHeight,
- TextStyle? popupTextStyle,
- TextStyle? popupGroupHeaderStyle,
- TextStyle? fieldTextStyle,
- BoxDecoration? selectedChipDecoration,
- BoxDecoration? fieldDecoration,
- double? elevation,
- bool showDropdownPositionIcon = true,
- bool showDeleteAllIcon = true,
- ItemDropperLocalizations? localizations,
Implementation
const MultiItemDropper({
super.key,
required this.items,
this.selectedItems,
required this.onChanged,
this.popupItemBuilder,
required this.width,
this.enabled = true,
this.hintText,
this.maxSelected,
this.onAddItem,
this.onDeleteItem,
this.inputKey,
this.maxDropdownHeight = MultiSelectConstants.kDefaultMaxDropdownHeight,
this.showScrollbar = true,
this.scrollbarThickness = ItemDropperConstants.kDefaultScrollbarThickness,
this.itemHeight,
this.popupTextStyle,
this.popupGroupHeaderStyle,
this.fieldTextStyle,
this.selectedChipDecoration,
this.fieldDecoration,
this.elevation,
this.showDropdownPositionIcon = true,
this.showDeleteAllIcon = true,
this.localizations,
}) : assert(
maxSelected == null || maxSelected >= 2,
'maxSelected must be null or >= 2',
);