MultiSelectChipField<V> class

Inheritance

Constructors

MultiSelectChipField({required List<MultiSelectItem<V>> items, BoxDecoration? decoration, Color? chipColor, Color? selectedChipColor, Color colorator(V)?, TextStyle? textStyle, TextStyle? selectedTextStyle, Icon? icon, Icon? searchIcon, Icon? closeSearchIcon, ShapeBorder? chipShape, dynamic onTap(List<V>)?, Text? title, bool scroll = true, bool? searchable, String? searchHint, TextStyle? searchHintStyle, TextStyle? searchTextStyle, Color? headerColor, GlobalKey<FormFieldState>? key, FormFieldSetter<List<V>>? onSaved, FormFieldValidator<List<V>>? validator, AutovalidateMode autovalidateMode = AutovalidateMode.disabled, List<V>? initialValue, Widget itemBuilder(MultiSelectItem<V>, FormFieldState<List<V>>)?, double? height, dynamic scrollControl(ScrollController)?, HorizontalScrollBar? scrollBar, bool showHeader = true, double? chipWidth})

Properties

autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
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
chipColor Color?
Color of the chip while not selected.
final
chipShape ShapeBorder?
Set a ShapeBorder. Typically a RoundedRectangularBorder.
final
chipWidth double?
Set the width of the chip.
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.
final
decoration BoxDecoration?
Style the Container that makes up the field.
final
enabled bool
Whether the form is able to receive user input.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headerColor Color?
Set the header color.
final
height double?
Set the height of the selectable area.
final
icon Icon?
The icon displayed in front of text on selected chips.
final
initialValue List<V>?
An optional value to initialize the form field to, or null otherwise.
final
itemBuilder → (Widget Function(MultiSelectItem<V>, FormFieldState<List<V>>)?)
Build a custom widget that gets created dynamically for each item.
final
items List<MultiSelectItem<V>>
List of items to select from.
final
key GlobalKey<FormFieldState>?
Controls how one widget replaces another widget in the tree.
final
onSaved FormFieldSetter<List<V>>?
An optional method to call with the final value when the form is saved via FormState.save.
final
onTap → (dynamic Function(List<V>)?)
Fires when a chip is tapped. A good time to store the selected values.
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
scroll bool
Enables horizontal scrolling. Default is true.
final
scrollBar HorizontalScrollBar?
Define a HorizontalScrollBar.
final
scrollControl → (dynamic Function(ScrollController)?)
Make use of the ScrollController to automatically scroll through the list.
final
searchable bool?
Enables search functionality.
final
searchHint String?
Set the search hint.
final
searchHintStyle TextStyle?
Set the TextStyle of the search hint.
final
searchIcon Icon?
Replaces the deafult search icon when searchable is true.
final
searchTextStyle TextStyle?
Set the TextStyle of the text that gets typed into the search bar.
final
selectedChipColor Color?
Sets the color of the chip while selected.
final
selectedTextStyle TextStyle?
Style the text of the selected chips.
final
showHeader bool
Determines whether to show the header.
final
textStyle TextStyle?
Style the text of the chips.
final
title Text?
Defines the header text.
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}) 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