SelectChipsInput class

The SelectChipsInput widget is a text field that allows the user to select chips and get the selected chips as output.

Inheritance

Constructors

SelectChipsInput({Key? key, required List<String> chipsText, List<Widget?>? suffixIcons = null, List<Widget?>? prefixIcons = null, Widget? selectedPrefixIcon = null, Widget? selectedSuffixIcon = null, List<Widget?>? selectedPrefixIcons = null, List<Widget?>? selectedSuffixIcons = null, String? separatorCharacter, BoxDecoration selectedChipDecoration = const BoxDecoration(), BoxDecoration unselectedChipDecoration = const BoxDecoration(), EdgeInsets marginBetweenChips = const EdgeInsets.symmetric(horizontal: 2.0, vertical: 1.0), EdgeInsets paddingInsideChipContainer = const EdgeInsets.symmetric(vertical: 8.0, horizontal: 14.0), EdgeInsets paddingInsideWidgetContainer = const EdgeInsets.all(8.0), BoxDecoration widgetContainerDecoration = const BoxDecoration(shape: BoxShape.rectangle, color: Colors.blue, borderRadius: BorderRadius.all(Radius.circular(50.0))), TextStyle selectedChipTextStyle = const TextStyle(color: Colors.white), TextStyle unselectedChipTextStyle = const TextStyle(color: Colors.white), bool? onlyOneChipSelectable = false, void onTap(String, int)?, WrapAlignment? wrapAlignment = WrapAlignment.start, WrapAlignment? wrapRunAlignment = WrapAlignment.start, WrapCrossAlignment? wrapCrossAlignment = WrapCrossAlignment.start, List<int>? preSelectedChips})
Creates a SelectChipsInput widget.
const

Properties

chipsText List<String>
Chip text list.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
marginBetweenChips EdgeInsets
Margin between the chips.
final
onlyOneChipSelectable bool?
If true, only one chip can be selected at a time.
final
onTap → (void Function(String, int)?)
Callback when the chip is tapped, returns output and index of last chip selected.
final
paddingInsideChipContainer EdgeInsets
Padding inside the chip container.
final
paddingInsideWidgetContainer EdgeInsets
Padding inside the main widget container;
final
prefixIcons List<Widget?>?
Prefix icon list, if a particular chip doesn't need to have a prefix icon, pass null in its corresponding place.
final
preSelectedChips List<int>?
Pre selected chips index List.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedChipDecoration BoxDecoration
Decoration for the selected chip container.
final
selectedChipTextStyle TextStyle
Text style for the chip.
final
selectedPrefixIcon Widget?
selected Prefix icon (1 icon applies to all selected chips)
final
selectedPrefixIcons List<Widget?>?
Prefix icon list that will be shown when the chip is selected.
final
selectedSuffixIcon Widget?
selected Suffix icon (1 icon applies to all selected chips)
final
selectedSuffixIcons List<Widget?>?
Suffix icon list that will be shown when the chip is selected.
final
separatorCharacter String?
Character to seperate the output. For example: ' ' will seperate the output by space.
final
suffixIcons List<Widget?>?
Suffix icon list, if a particular chip doesn't need to have a suffix icon, pass null in its corresponding place.
final
unselectedChipDecoration BoxDecoration
Decoration for the unselected chip container.
final
unselectedChipTextStyle TextStyle
Text style for the chip.
final
widgetContainerDecoration BoxDecoration
Decoration for the chip container.
final
wrapAlignment WrapAlignment?
Wrap alignment for the chips.
final
wrapCrossAlignment WrapCrossAlignment?
Wrap run alignment for the chips in the cross axis.
final
wrapRunAlignment WrapAlignment?
Wrap run alignment for the chips.
final

Methods

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