MultiItemDropper<T> class

Multi-select dropdown widget Allows selecting multiple items with chip-based display

Inheritance

Constructors

MultiItemDropper({Key? key, required List<ItemDropperItem<T>> items, List<ItemDropperItem<T>>? selectedItems, required void onChanged(List<ItemDropperItem<T>>), Widget popupItemBuilder(BuildContext, ItemDropperItem<T>, bool)?, required double width, bool enabled = true, String? hintText, int? maxSelected, ItemDropperItem<T>? onAddItem(String searchText)?, void onDeleteItem(ItemDropperItem<T> item)?, GlobalKey<State<StatefulWidget>>? inputKey, 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})
const

Properties

elevation double?
Popup shadow elevation.
final
enabled bool
Whether the dropdown is enabled (defaults to true).
final
fieldDecoration BoxDecoration?
Optional BoxDecoration for the main field/container.
final
fieldTextStyle TextStyle?
Text style for input/search field and chips.
final
hashCode int
The hash code for this object.
no setterinherited
hintText String?
Hint/placeholder text for input field (if null, no hint).
final
inputKey GlobalKey<State<StatefulWidget>>?
Optional GlobalKey for the input field container.
final
itemHeight double?
Height for popup dropdown items.
final
items List<ItemDropperItem<T>>
The items to display in the dropdown (required).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
localizations ItemDropperLocalizations?
Localization strings for user-facing text (optional). If not provided, uses default English strings.
final
maxDropdownHeight double
Maximum dropdown popup height.
final
maxSelected int?
Maximum number of items selectable (null means unlimited).
final
onAddItem ItemDropperItem<T>? Function(String searchText)?
Callback for adding new items based on search text (optional).
final
onChanged → void Function(List<ItemDropperItem<T>>)
Called when the selection changes (required).
final
onDeleteItem → void Function(ItemDropperItem<T> item)?
Callback for deleting items, provides the deleted item (optional).
final
popupGroupHeaderStyle TextStyle?
Text style for group headers in popup.
final
popupItemBuilder Widget Function(BuildContext, ItemDropperItem<T>, bool)?
Optional custom builder for popup items.
final
popupTextStyle TextStyle?
Text style for popup dropdown items.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollbarThickness double
Popup vertical scrollbar thickness.
final
selectedChipDecoration BoxDecoration?
Custom BoxDecoration for selected chips.
final
selectedItems List<ItemDropperItem<T>>?
The currently selected items (optional for controlled usage).
final
showDeleteAllIcon bool
Whether to show the clear/X icon (defaults to true).
final
showDropdownPositionIcon bool
Whether to show the dropdown position arrow (defaults to true).
final
showScrollbar bool
Whether to show a vertical scrollbar in popup.
final
width double
The width of the dropdown field (required).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MultiItemDropper<T>>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited