MultiSelectDialog<V> class
A dialog containing either a classic checkbox style list, or a chip style list.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MultiSelectDialog
- Mixed in types
Constructors
-
MultiSelectDialog({required List<
MultiSelectItem< items, required List<V> >V> ? initialValue, Widget? title, void onSelectionChanged(List<V> )?, required void onConfirm(List<V> ?), MultiSelectListType? listType, bool? searchable, Text? confirmText, Text? cancelText, Color? selectedColor, String? searchHint, double? height, Color? colorator(V)?, Color? backgroundColor, Color? unselectedColor, Icon? searchIcon, Icon? closeSearchIcon, TextStyle? itemsTextStyle, TextStyle? searchHintStyle, TextStyle? searchTextStyle, TextStyle? selectedItemsTextStyle, Color? checkColor})
Properties
- backgroundColor → Color?
-
The background color of the dialog.
final
- cancelText → Text?
-
Text on the cancel button.
final
- checkColor → Color?
-
Set the color of the check in the checkbox
final
- closeSearchIcon → Icon?
-
Icon button that hides the search field
final
- colorator → (Color? Function(V)?)
-
A function that sets the color of selected items based on their value.
It will either set the chip color, or the checkbox color depending on the list type.
final
- confirmText → Text?
-
Text on the confirm button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Sets a fixed height on the dialog.
final
-
initialValue
→ List<
V> ? -
The list of selected values before interaction.
final
-
items
→ List<
MultiSelectItem< V> > -
List of items to select from.
final
- itemsTextStyle → TextStyle?
-
Style the text on the chips or list tiles.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listType → MultiSelectListType?
-
An enum that determines which type of list to render.
final
-
onConfirm
→ void Function(List<
V> ?) -
Fires when confirm is tapped.
final
-
onSelectionChanged
→ (void Function(List<
V> )?) -
Fires when the an item is selected / unselected.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchable → bool?
-
Toggles search functionality.
final
- searchHint → String?
-
Set the placeholder text of the search field.
final
- searchHintStyle → TextStyle?
-
Style the search hint.
final
- searchIcon → Icon?
-
Icon button that shows the search field.
final
- searchTextStyle → TextStyle?
-
Style the search text.
final
- selectedColor → Color?
-
Sets the color of the checkbox or chip when it's selected.
final
- selectedItemsTextStyle → TextStyle?
-
Style the text on the selected chips or list tiles.
final
- title → Widget?
-
The text at the top of the dialog.
final
- unselectedColor → Color?
-
The color of the chip body or checkbox border while not selected.
final
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.
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
-
onCancelTap(
BuildContext ctx, List< V> initiallySelectedValues) → void -
Pops the dialog from the navigation stack and returns the initially selected values.
inherited
-
onConfirmTap(
BuildContext ctx, List< V> selectedValues, dynamic onConfirm(List<V> ?)) → void -
Pops the dialog from the navigation stack and returns the selected values.
Calls the onConfirm function if one was provided.
inherited
-
onItemCheckedChange(
List< V> selectedValues, V itemValue, bool checked) → List<V> -
inherited
-
onSearchTap(
bool showSearch) → bool -
Toggles the search field.
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}) → 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
-
updateSearchQuery(
String? val, List< MultiSelectItem< allItems) → List<V> >MultiSelectItem< V> > -
Accepts the search query, and the original list of items.
If the search query is valid, return a filtered list, otherwise return the original list.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited