MultiSelectField<T> class abstract

Base abstract class for MultiSelectField variants.

This class provides two variants:

Example usage:

// Standard multiselect
MultiSelectField<Car>(
  data: () => carChoices,
  onSelect: (selected, isDefault) => print(selected),
)

// Chip dropdown variant
MultiSelectField<String>.chip(
  label: 'Filter',
  data: () => filterChoices,
  onSelect: (selected, isDefault) => print(selected),
)
Inheritance
Implementers

Constructors

MultiSelectField({Key? key, required List<Choice<T>> data(), void onSelect(List<Choice<T>> choiceList, bool isFromDefaultData)?, void onChanged(List<Choice<T>> selectedItems)?, Widget title(bool isEmpty)?, Widget? footer, Widget singleSelectWidget(Choice<T> choiceList)?, Widget multiSelectWidget(Choice<T> choiceList)?, bool cleanCurrentSelection, List<Choice<T>>? defaultData, bool isMandatory, bool singleSelection, bool useTextFilter, Decoration? decoration, double? menuWidth, double? menuHeight, bool menuWidthBaseOnContent, bool menuHeightBaseOnContent, TextStyle? textStyleSingleSelection, MenuStyle? menuStyle, Widget iconLeft(bool menuState, Choice<T>? choice)?, Widget iconRight(bool menuState, Choice<T>? choice)?, ButtonStyle? buttonStyle, bool mergeSelectedStyle, ButtonStyle? selectedItemButtonStyle, EdgeInsetsGeometry? itemPadding, EdgeInsetsGeometry? selectedItemPadding, Widget itemMenuButton(Choice<T> choiceList)?, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, TextStyle? selectedItemMenuStyle, String? label, TextStyle? textStyleLabel, Widget labelBuilder(String label)?, bool selectAllOption, bool showSelectedTick, Widget? menuLeadingIcon(Choice<T> choice, bool isSelected)?, Widget? menuTrailingIcon(Choice<T> choice, bool isSelected)?, ItemColor? itemColor, Color? itemDividerColor, Color? pressedColor, ScrollbarConfig? scrollbarConfig, bool staticLabel, double iconSpacing, FieldWidth? fieldWidth, bool closeOnSelect, Color? groupHeaderBackgroundColor, EdgeInsetsGeometry? groupHeaderPadding, Color? selectedTickColor, Color? selectAllIconColor})
Creates a standard MultiSelectField with full selection display.
const
factory
MultiSelectField.bottomSheet({Key? key, required String label, List<Choice<T>> data()?, void onSelect(List<Choice<T>> choiceList, bool isFromDefaultData)?, void onChanged(List<Choice<T>> selectedItems)?, List<Choice<T>>? defaultData, Widget? menuContent, Widget? menuHeader, Widget? menuFooter, BottomSheetStyle? bottomSheetStyle, VoidCallback? onOpened, VoidCallback? onClosed, bool enabled, Widget? child, bool singleSelection, bool selectAllOption, bool useTextFilter, bool closeOnSelect, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, EdgeInsetsGeometry? titleMenuPadding, Widget searchBuilder(void onSearch(String query))?, String? searchHint, TextStyle? searchHintStyle, double? searchMinHeight})
Creates a MultiSelectField that opens a bottom sheet for selection.
const
factory
MultiSelectField.chip({Key? key, required String label, List<Choice<T>> data()?, void onSelect(List<Choice<T>> choiceList, bool isFromDefaultData)?, void onChanged(List<Choice<T>> selectedItems)?, List<Choice<T>>? defaultData, Widget? menuContent, Widget? menuHeader, Widget? menuFooter, ChipStyle? chipStyle, ChipMenuStyle? menuStyle, ChipSize? chipSize, VoidCallback? onMenuOpened, VoidCallback? onMenuClosed, bool enabled, Widget? leading, Widget? trailing, bool showDropdownIcon, bool singleSelection, bool selectAllOption, MenuController? controller, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, EdgeInsetsGeometry? titleMenuPadding})
Creates a compact chip-style MultiSelectField.
const
factory
MultiSelectField.drawer({Key? key, required String label, List<Choice<T>> data()?, void onSelect(List<Choice<T>> choiceList, bool isFromDefaultData)?, void onChanged(List<Choice<T>> selectedItems)?, List<Choice<T>>? defaultData, Widget? menuContent, Widget? menuHeader, Widget? menuFooter, DrawerStyle? drawerStyle, String? keyDrawer, GlobalKey<ScaffoldState>? scaffoldKey, VoidCallback? onOpened, VoidCallback? onClosed, bool enabled, Widget? child, bool singleSelection, bool selectAllOption, bool useTextFilter, bool closeOnSelect, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, EdgeInsetsGeometry? titleMenuPadding})
Creates a MultiSelectField that opens a drawer for selection.
const
factory
MultiSelectField.internal({Key? key})
Internal constructor for subclasses.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
inherited
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