FormBuilderChoiceChips<T> class

A list of Chips that acts like radio buttons

Inheritance

Constructors

FormBuilderChoiceChips({AutovalidateMode? autovalidateMode = AutovalidateMode.disabled, bool enabled = true, FocusNode? focusNode, FormFieldSetter<T>? onSaved, FormFieldValidator<T>? validator, InputDecoration decoration = const InputDecoration(), Key? key, required String name, required List<FormBuilderChipOption<T>> options, T? initialValue, String? restorationId, ValueChanged<T?>? onChanged, ValueTransformer<T?>? valueTransformer, VoidCallback? onReset, FormFieldErrorBuilder? errorBuilder, WrapAlignment alignment = WrapAlignment.start, ShapeBorder avatarBorder = const CircleBorder(), Color? backgroundColor, WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start, Axis direction = Axis.horizontal, Color? disabledColor, double? elevation, EdgeInsets? labelPadding, TextStyle? labelStyle, MaterialTapTargetSize? materialTapTargetSize, EdgeInsets? padding, double? pressElevation, WrapAlignment runAlignment = WrapAlignment.start, double runSpacing = 0.0, Color? selectedColor, Color? selectedShadowColor, Color? shadowColor, BorderSide? side, OutlinedBorder? shape, double spacing = 0.0, TextDirection? textDirection, VerticalDirection verticalDirection = VerticalDirection.down, VisualDensity? visualDensity, bool showCheckmark = true, Color? surfaceTintColor, Clip clipBehavior = Clip.none, Color? checkmarkColor, bool autofocus = false, BoxConstraints? avatarBoxConstraints, ChipAnimationStyle? chipAnimationStyle, WidgetStateProperty<Color?>? color, IconThemeData? iconTheme, String? tooltip})
Creates a list of Chips that acts like radio buttons

Properties

alignment → WrapAlignment
How the children within a run should be placed in the main axis.
final
autofocus → bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
autovalidateMode → AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
avatarBorder → ShapeBorder
final
avatarBoxConstraints → BoxConstraints?
Constraints to be enforced on the avatar's box.
final
backgroundColor → Color?
Color to be used for the unselected, enabled chip's background.
final
builder → FormFieldBuilder<T>
Function that returns the widget representing this form field.
finalinherited
checkmarkColor → Color?
The color of the chip's check mark when selected.
final
chipAnimationStyle → ChipAnimationStyle?
The style of the chip's animation when selected or deselected.
final
clipBehavior → Clip
The content will be clipped (or not) according to this option.
final
color → WidgetStateProperty<Color?>?
The color of the chip.
final
crossAxisAlignment → WrapCrossAlignment
How the children within a run should be aligned relative to each other in the cross axis.
final
decoration → InputDecoration
finalinherited
direction → Axis
The direction to use as the main axis when wrapping chips.
final
disabledColor → Color?
Color to be used for the chip's background indicating that it is disabled.
final
elevation → double?
Elevation to be applied on the chip relative to its parent.
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
focusNode → FocusNode?
An optional focus node to use as the focus node for this widget.
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
iconTheme → IconThemeData?
The icon theme data for the icon.
final
initialValue → T?
An optional value to initialize the form field to, or null otherwise.
finalinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelPadding → EdgeInsets?
The padding around the label widget.
final
labelStyle → TextStyle?
The style to be applied to the chip's label.
final
materialTapTargetSize → MaterialTapTargetSize?
Configures the minimum size of the tap target.
final
name → String
Used to reference the field within the form, or to reference form data after the form is submitted.
finalinherited
onChanged → ValueChanged<T?>?
Called when the field value is changed.
finalinherited
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
onSaved → ValueChanged<T?>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
options → List<FormBuilderChipOption<T>>
The list of items the user can select.
final
padding → EdgeInsets?
The padding between the contents of the chip and the outside shape.
final
pressElevation → double?
Elevation to be applied on the chip relative to its parent during the press motion.
final
restorationId → String?
Restoration ID to save and restore the state of the form field.
finalinherited
runAlignment → WrapAlignment
How the runs themselves should be placed in the cross axis.
final
runSpacing → double
How much space to place between the runs themselves in the cross axis.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedColor → Color?
Color to be used for the chip's background, indicating that it is selected.
final
selectedShadowColor → Color?
Color of the chip's shadow when the elevation is greater than 0 and the chip is selected.
final
shadowColor → Color?
Color of the chip's shadow when the elevation is greater than 0.
final
shape → OutlinedBorder?
The OutlinedBorder to draw around the chip.
final
showCheckmark → bool
Indicates whether a checkmark should be displayed on the selected choice chip.
final
side → BorderSide?
The color and weight of the chip's outline.
final
spacing → double
How much space to place between children in a run in the main axis.
final
surfaceTintColor → Color?
The surface tint color of the chip when it is selected.
final
textDirection → TextDirection?
Determines the order to lay children out horizontally and how to interpret start and end in the horizontal direction.
final
tooltip → String?
The tooltip message to show when long pressing on the chip.
final
validator → FormFieldValidator<T>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
finalinherited
valueTransformer → ValueTransformer<T?>?
Called just before field value is saved. Used to massage data just before committing the value.
finalinherited
verticalDirection → VerticalDirection
Determines the order to lay children out vertically and how to interpret start and end in the vertical direction.
final
visualDensity → VisualDensity?
Defines how compact the chip's layout will be.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FormBuilderFieldDecorationState<FormBuilderChoiceChips<T>, T>
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, 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