ChipMultiSelectField<T> class
Chip variant implementation of MultiSelectField.
Displays as a compact chip that opens a dropdown menu when tapped. Ideal for filter bars or space-constrained areas.
Can use either:
- data to auto-generate selection list (like standard MultiSelectField)
- menuContent for fully custom dropdown content
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MultiSelectField<
T> - ChipMultiSelectField
Constructors
-
ChipMultiSelectField({Key? key, required String label, List<
Choice< data()?, void onSelect(List<T> >Choice< choiceList, bool isFromDefaultData)?, List<T> >Choice< ? defaultData, ChipStyle? chipStyle, VoidCallback? onMenuOpened, VoidCallback? onMenuClosed, bool enabled = true, Widget? leading, Widget? trailing, bool showDropdownIcon = true, bool singleSelection = false, bool selectAllOption = false, MenuController? controller, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, EdgeInsetsGeometry? titleMenuPadding, ChipSize? chipSize})T> > -
const
Properties
- chipSize → ChipSize?
-
Size configuration for proportional scaling.
Use ChipSize.small, ChipSize.medium, ChipSize.large or custom.
final
- chipStyle → ChipStyle?
-
Style configuration for the chip.
final
- controller → MenuController?
-
Controller for programmatic menu control.
final
-
data
→ List<
Choice< Function()?T> > -
Data source for selection options.
If null, menuContent must be provided.
final
-
defaultData
→ List<
Choice< ?T> > -
Pre-selected choices.
final
- enabled → bool
-
Whether the chip is interactive.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemMenuStyle → TextStyle?
-
Text style for items in the menu.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The label displayed on the chip.
final
- leading → Widget?
-
Widget to display before the label.
final
-
Custom content for the dropdown menu.
If provided, overrides auto-generated list from data.
final
-
Optional footer widget for the menu.
final
-
Optional header widget for the menu.
final
-
Style configuration for the dropdown menu.
final
- onMenuClosed → VoidCallback?
-
Called when the menu closes.
final
- onMenuOpened → VoidCallback?
-
Called when the menu opens.
final
-
onSelect
→ void Function(List<
Choice< choiceList, bool isFromDefaultData)?T> > -
Callback when selection changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectAllOption → bool
-
If true, shows "Select All" option.
final
- showDropdownIcon → bool
-
Whether to show the dropdown arrow icon.
final
- singleSelection → bool
-
If true, only one item can be selected at a time.
final
- titleMenuPadding → EdgeInsetsGeometry?
-
Padding for group titles in the menu.
final
- titleMenuStyle → TextStyle?
-
Text style for group titles in the menu.
final
- trailing → Widget?
-
Widget to display after the label (before dropdown icon).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ChipMultiSelectField< 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