MultiSelectField<T> class
abstract
Base abstract class for MultiSelectField variants.
This class provides two variants:
- MultiSelectField (default) - Full multiselect field with chips display
- MultiSelectField.chip - Compact chip dropdown for space-constrained areas
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
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MultiSelectField
- Implementers
Constructors
-
MultiSelectField({Key? key, required List<
Choice< data(), void onSelect(List<T> >Choice< choiceList, bool isFromDefaultData)?, void onChanged(List<T> >Choice< selectedItems)?, Widget title(bool isEmpty)?, Widget singleSelectWidget(Choice<T> >T> choiceList)?, Widget multiSelectWidget(Choice<T> choiceList)?, bool cleanCurrentSelection, List<Choice< ? defaultData, bool isMandatory, bool singleSelection, bool useTextFilter, Decoration? decoration, TextStyle? textStyleSingleSelection, Widget iconLeft(Choice<T> >T> ? choice)?, Widget iconRight(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, 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.
constfactory
-
MultiSelectField.bottomSheet({Key? key, required String label, List<
Choice< data()?, void onSelect(List<T> >Choice< choiceList, bool isFromDefaultData)?, void onChanged(List<T> >Choice< selectedItems)?, List<T> >Choice< ? defaultData, 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})T> > -
Creates a MultiSelectField that opens a bottom sheet for selection.
constfactory
-
MultiSelectField.chip({Key? key, required String label, List<
Choice< data()?, void onSelect(List<T> >Choice< choiceList, bool isFromDefaultData)?, void onChanged(List<T> >Choice< selectedItems)?, List<T> >Choice< ? defaultData, ChipStyle? chipStyle, 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})T> > -
Creates a compact chip-style MultiSelectField.
constfactory
-
MultiSelectField.drawer({Key? key, required String label, List<
Choice< data()?, void onSelect(List<T> >Choice< choiceList, bool isFromDefaultData)?, void onChanged(List<T> >Choice< selectedItems)?, List<T> >Choice< ? defaultData, DrawerStyle? drawerStyle, String? keyDrawer, GlobalKey<T> >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.
constfactory
- MultiSelectField.internal({Key? key})
-
Internal constructor for subclasses.
const
Properties
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