DrawerMultiSelectField<T> class
Drawer variant implementation of MultiSelectField.
Behaves differently depending on whether scaffoldKey is provided:
With scaffoldKey — Renders the selection content directly.
Place it inside your Scaffold's endDrawer or drawer:
Scaffold(
key: scaffoldKey,
endDrawer: Drawer(
child: MultiSelectField<String>.drawer(
label: 'Filter',
keyDrawer: 'myFilter',
scaffoldKey: scaffoldKey,
data: () => choices,
onSelect: (selected, _) => print(selected),
),
),
)
Without scaffoldKey — Renders a trigger widget that opens a standalone overlay drawer on tap:
MultiSelectField<String>.drawer(
label: 'Filter',
data: () => choices,
onSelect: (selected, _) => print(selected),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MultiSelectField<
T> - DrawerMultiSelectField
Constructors
-
DrawerMultiSelectField({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 = true, Widget? child, bool singleSelection = false, bool selectAllOption = false, bool useTextFilter = false, bool closeOnSelect = false, TextStyle? titleMenuStyle, TextStyle? itemMenuStyle, EdgeInsetsGeometry? titleMenuPadding}) -
const
Properties
- child → Widget?
-
final
- closeOnSelect → bool
-
final
-
data
→ List<
Choice< Function()?T> > -
final
-
defaultData
→ List<
Choice< ?T> > -
final
- drawerStyle → DrawerStyle?
-
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemMenuStyle → TextStyle?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyDrawer → String?
-
final
- label → String
-
final
-
final
-
final
-
final
-
onChanged
→ void Function(List<
Choice< selectedItems)?T> > -
final
- onClosed → VoidCallback?
-
final
- onOpened → VoidCallback?
-
final
-
onSelect
→ void Function(List<
Choice< choiceList, bool isFromDefaultData)?T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scaffoldKey
→ GlobalKey<
ScaffoldState> ? -
final
- selectAllOption → bool
-
final
- singleSelection → bool
-
final
- titleMenuPadding → EdgeInsetsGeometry?
-
final
- titleMenuStyle → TextStyle?
-
final
- useTextFilter → bool
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DrawerMultiSelectField< 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