RadioField class
Field with multiple choices, presented in a row. It is a part of many standard fields: combo, radio, checkbox.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RadioField
Constructors
-
RadioField({required List<
String> options, List<String> ? labels, List<Widget> ? widgetLabels, String? value, List<String> ? values, bool wrap = false, bool multi = false, bool keepFirst = false, bool keepOrder = false, dynamic onChange(String?)?, dynamic onMultiChange(List<String> )?}) -
Creates a widget. Only
optionsare technically required, but you should also specify either ofvalueorvalues, and a callback function betweenonChangeandonMultiChange.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepFirst → bool
-
Keep the first options before all others. Use only for a fake first option,
e.g. that launches a dialog. Warning: this implies the first option can never be a value.
final
- keepOrder → bool
-
Whether to keep the order of options. If not set, and the options do not
fit on the screen, when tapping one, it is moved to the front. This
might be unwelcome, for example, with numeric options.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
labels
→ List<
String> ? -
Labels for options. If preset, they replace values in presentation.
final
- multi → bool
-
Whether to allow multi-selection.
final
- onChange → dynamic Function(String?)?
-
A callback function for when the value (singular) changes. If multiple
values can be chosen, they will be joined with a semicolon.
final
-
onMultiChange
→ dynamic Function(List<
String> )? -
A callback function for multiple changed values, if enabled.
final
-
options
→ List<
String> -
Which options — meaning tag values — are available.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String?
-
The currently present tag value. Can be empty of course. Can also contain
several values joined by a semicolon ("yes;no").
final
-
values
→ List<
String> ? -
Instead of value, specify this when the field expects multiple values.
See multi.
final
-
widgetLabels
→ List<
Widget> ? -
Widget labels: for example, images. Has preference over labels.
Basically the latter are wrapped in Text and merged into a single list.
final
- wrap → bool
-
If set, the field will wrap at the edge of the screen. Otherwise it
will be horizontally scrollable.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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