RadioButtonGroup class
Constructors
RadioButtonGroup ({Key ? key , required List <String ? > labels , String ? picked , List <String > ? disabled , void onChange (String label , int index )?, void onSelected (String selected )?, TextStyle labelStyle = const TextStyle() , Color ? activeColor , GroupedButtonsOrientation orientation = GroupedButtonsOrientation.VERTICAL , Widget itemBuilder (Radio radioButton , Text label , int index )?, EdgeInsetsGeometry padding = EdgeInsets.zero , EdgeInsetsGeometry margin = EdgeInsets.zero })
Properties
activeColor
→ Color ?
The color to use when a Radio button is checked.
When null, defaults to Theme.of(context).toggleableActiveColor
final
disabled
→ List <String > ?
Specifies which buttons should be disabled.
If this is non-null, no buttons will be disabled.
The strings passed to this must match the labels.
final
hashCode
→ int
The hash code for this object.
no setter inherited
itemBuilder
→ Widget Function(Radio radioButton , Text label , int index ) ?
Called when needed to build a RadioButtonGroup element.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
labels
→ List <String ? >
A list of strings that describes each Radio button. Each label must be distinct.
final
labelStyle
→ TextStyle
The style to use for the labels.
final
margin
→ EdgeInsetsGeometry
Empty space surrounding the RadioButtonGroup.
final
onChange
→ void Function(String label , int index ) ?
Called when the value of the RadioButtonGroup changes.
final
onSelected
→ void Function(String selected ) ?
Called when the user makes a selection.
final
orientation
→ GroupedButtonsOrientation
Specifies the orientation to display elements.
final
padding
→ EdgeInsetsGeometry
Empty space in which to inset the RadioButtonGroup.
final
picked
→ String ?
Specifies which Radio button to automatically pick.
Every element must match a label.
This is useful for clearing what is picked (set it to "").
If this is non-null, then the user must handle updating this; otherwise, the state of the RadioButtonGroup won't change.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited