Radio<T> class

A single radio button that selects one value from a mutually exclusive group.

Use groupValue to identify the currently selected value for the group. When the user activates this radio, onChanged is called with value.

Inheritance

Constructors

Radio({Key? key, required T value, required T? groupValue, ValueChanged<T?>? onChanged, FocusNode? focusNode, Color? activeColor, Color? checkColor})
Creates a Radio with the given value and groupValue.
const

Properties

activeColor Color?
The color of the filled indicator when selected.
final
checkColor Color?
The color of the check dot inside the indicator.
final
focusNode FocusNode?
An optional focus node for keyboard navigation.
final
groupValue → T?
The currently selected value in the radio group.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
finalinherited
onChanged ValueChanged<T?>?
Called when the user selects this radio button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The value represented by this radio button.
final

Methods

createElement() StatefulElement
Creates the Element for this widget.
inherited
createState() State<Radio<T>>
Creates the mutable state for this widget.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited