SimpleChipsInput class

The SimpleChipsInput widget is a text field that allows the user to input and create chips out of it.

Inheritance

Constructors

SimpleChipsInput({Key? key, required String separatorCharacter, bool placeChipsSectionAbove = true, BoxDecoration widgetContainerDecoration = 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 chipContainerDecoration = const BoxDecoration(shape: BoxShape.rectangle, color: Colors.blue, borderRadius: BorderRadius.all(Radius.circular(50.0))), TextFormFieldStyle textFormFieldStyle = const TextFormFieldStyle(), TextStyle chipTextStyle = const TextStyle(color: Colors.white), FocusNode? focusNode, bool autoFocus = false, TextEditingController? controller, String createCharacter = ' ', Widget? deleteIcon, bool validateInput = false, dynamic validateInputMethod(String)?, String eraseKeyLabel = 'Backspace', GlobalKey<FormState>? formKey, void onChanged(String)?, void onEditingComplete()?, void onSubmitted(String)?, void onSaved(String)?, void onChipDeleted(String, int)?, void onChipAdded(String)?, void onChipsCleared()?})
Creates a SimpleChipsInput widget.
const

Properties

autoFocus bool
Whether to autofocus the widget.
final
chipContainerDecoration BoxDecoration
Decoration for the chip container.
final
chipTextStyle TextStyle
Text style for the chip.
final
controller TextEditingController?
Controller for the textfield.
final
createCharacter String
The input character used for creating a chip.
final
deleteIcon Widget?
Icon for the delete method.
final
eraseKeyLabel String
The key label used for erasing a chip. Defaults to Backspace.
final
focusNode FocusNode?
FocusNode for the text field.
final
formKey GlobalKey<FormState>?
Form key to access or validate the form outside the widget.
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
onChanged → (void Function(String)?)
final
onChipAdded → (void Function(String)?)
Callback when a chip is added. Returns the added chip content.
final
onChipDeleted → (void Function(String, int)?)
Callback when a chip is deleted. Returns the deleted chip content and index.
final
onChipsCleared → (void Function()?)
Callback when all chips are cleared.
final
onEditingComplete → (void Function()?)
final
onSaved → (void Function(String)?)
final
onSubmitted → (void Function(String)?)
final
paddingInsideChipContainer EdgeInsets
Padding inside the chip container.
final
paddingInsideWidgetContainer EdgeInsets
Padding inside the main widget container;
final
placeChipsSectionAbove bool
Whether to place the chips section above or below the text field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separatorCharacter String
Character to seperate the output. For example: ' ' will seperate the output by space.
final
textFormFieldStyle TextFormFieldStyle
Style for the textfield.
final
validateInput bool
Whether to validate input before adding to a chip.
final
validateInputMethod → (dynamic Function(String)?)
Validation method.
final
widgetContainerDecoration BoxDecoration
Decoration for the main widget container.
final

Methods

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