MultiSelectDialogField<V> class

A customizable InkWell widget that opens the MultiSelectDialog

Inheritance

Constructors

MultiSelectDialogField({required List<MultiSelectItem<V>> items, required void onConfirm(List<V>), Widget? title, Text? buttonText, Icon? buttonIcon, MultiSelectListType? listType, BoxDecoration? decoration, void onSelectionChanged(List<V>)?, MultiSelectChipDisplay<V>? chipDisplay, bool searchable = false, Text? confirmText, Text? cancelText, Color? barrierColor, Color? selectedColor, String? searchHint, double? dialogHeight, double? dialogWidth, Color colorator(V)?, Color? backgroundColor, Color? unselectedColor, Icon? searchIcon, Icon? closeSearchIcon, TextStyle? itemsTextStyle, TextStyle? searchTextStyle, TextStyle? searchHintStyle, TextStyle? selectedItemsTextStyle, bool separateSelectedItems = false, Color? checkColor, bool isDismissible = true, FormFieldSetter<List<V>>? onSaved, FormFieldValidator<List<V>>? validator, List<V> initialValue = const [], AutovalidateMode autovalidateMode = AutovalidateMode.disabled, GlobalKey<FormFieldState>? key})

Properties

autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
final
backgroundColor Color?
Set the background color of the dialog.
final
barrierColor Color?
Set the color of the space outside the BottomSheet.
final
builder FormFieldBuilder<List<V>>
Function that returns the widget representing this form field. It is passed the form field state as input, containing the current value and validation state of this field.
finalinherited
buttonIcon Icon?
Specify the button icon.
final
buttonText Text?
Set text that is displayed on the button.
final
cancelText Text?
Text on the cancel button.
final
checkColor Color?
Set the color of the check in the checkbox
final
chipDisplay MultiSelectChipDisplay<V>?
Overrides the default MultiSelectChipDisplay attached to this field. If you want to remove it, use MultiSelectChipDisplay.none().
final
closeSearchIcon Icon?
Replaces the default close search icon when searchable is true.
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
decoration BoxDecoration?
Style the Container that makes up the field.
final
dialogHeight double?
Sets a fixed height on the dialog.
final
dialogWidth double?
Sets a fixed width on the dialog.
final
enabled bool
Whether the form is able to receive user input.
finalinherited
forceErrorText String?
An optional property that forces the FormFieldState into an error state by directly setting the FormFieldState.errorText property without running the validator function.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
initialValue List<V>
The list of selected values before interaction.
final
isDismissible bool
Whether the user can dismiss the widget by tapping outside
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 GlobalKey<FormFieldState>?
Controls how one widget replaces another widget in the tree.
final
listType MultiSelectListType?
An enum that determines which type of list to render.
final
onConfirm → void Function(List<V>)
Fires when confirm is tapped.
final
onSaved FormFieldSetter<List<V>>?
An optional method to call with the final value when the form is saved via FormState.save.
final
onSelectionChanged → void Function(List<V>)?
Fires when the an item is selected / unselected.
final
restorationId String?
Restoration ID to save and restore the state of the form field.
finalinherited
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?
Replaces the deafult search icon when searchable is true.
final
searchTextStyle TextStyle?
Style the text that is typed into the search field.
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
separateSelectedItems bool
Moves the selected items to the top of the list.
final
state FormFieldState<List<V>>?
getter/setter pair
title Widget?
The text at the top of the dialog.
final
unselectedColor Color?
Color of the chip body or checkbox border while not selected.
final
validator FormFieldValidator<List<V>>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() FormFieldState<List<V>>
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