RadioButtonGroup class

Inheritance

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 setterinherited
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.
finalinherited
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 setterinherited

Methods

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