FormBuilderChoiceChip<T> class
A list of Chip
s that acts like radio buttons
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FormField<
T> - FormBuilderField<
T> - FormBuilderChoiceChip
Constructors
-
FormBuilderChoiceChip({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< options, T? initialValue, 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, OutlinedBorder? shape, bool shouldRequestFocus = false, double spacing = 0.0, TextDirection? textDirection, VerticalDirection verticalDirection = VerticalDirection.down, VisualDensity? visualDensity, ValueChanged<T> >T?> ? onChanged, ValueTransformer<T?> ? valueTransformer, VoidCallback? onReset}) -
Creates a list of
Chip
s that acts like radio buttons
Properties
- alignment → WrapAlignment
-
How the children within a run should be placed in the main axis.
final
- autovalidateMode → AutovalidateMode
-
Used to enable/disable this form field auto validation and update its
error text.
finalinherited
- avatarBorder → ShapeBorder
-
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. It is
passed the form field state as input, containing the current value and
validation state of this field.
finalinherited
- crossAxisAlignment → WrapCrossAlignment
-
How the children within a run should be aligned relative to each other in
the cross axis.
final
- decoration → InputDecoration
-
The border, labels, icons, and styles used to decorate the field.
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
- 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
- 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?
-
Called when the field value is reset.
finalinherited
-
onSaved
→ FormFieldSetter<
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
- shouldRequestFocus → bool
-
final
- spacing → double
-
How much space to place between children in a run in the main axis.
final
- textDirection → TextDirection?
-
Determines the order to lay children out horizontally and how to interpret
start
andend
in the horizontal direction.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
andend
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(
) → FormBuilderFieldState< FormBuilderChoiceChip< 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}) → 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