MultiSelectBottomSheetField<V> class

A customizable InkWell widget that opens the MultiSelectBottomSheet

Inheritance

Constructors

MultiSelectBottomSheetField({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, List<V> initialValue = const [], bool searchable = false, Text? confirmText, Text? cancelText, Color? selectedColor, double? initialChildSize, double? minChildSize, double? maxChildSize, ShapeBorder? shape, Color? barrierColor, String? searchHint, 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, GlobalKey<FormFieldState>? key, FormFieldSetter<List<V>>? onSaved, FormFieldValidator<List<V>>? validator, AutovalidateMode autovalidateMode = AutovalidateMode.disabled})

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 bottom sheet.
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.
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
enabled → bool
Whether the form is able to receive user input.
finalinherited
errorBuilder → FormFieldErrorBuilder?
Function that returns the widget representing the error to display.
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
initialChildSize → double?
Set the initial height of the BottomSheet.
final
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?
The TextStyle of the items within the BottomSheet.
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
maxChildSize → double?
Set the maximum height of the BottomSheet.
final
minChildSize → double?
Set the minimum height threshold of the BottomSheet before it closes.
final
onConfirm → void Function(List<V>)
Fires when confirm is tapped.
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
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 hint 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 body when 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
shape → ShapeBorder?
Apply a ShapeBorder to alter the edges of the BottomSheet.
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