YaruRadio<T> constructor
const
YaruRadio<T> ({
- Key? key,
- required T value,
- required T? groupValue,
- bool toggleable = false,
- required ValueChanged<
T?> ? onChanged, - Color? selectedColor,
- Color? checkmarkColor,
- FocusNode? focusNode,
- bool autofocus = false,
- MouseCursor? mouseCursor,
- WidgetStatesController? statesController,
Create a Yaru radio.
The radio button itself does not maintain any state. Instead, selecting the
radio invokes the onChanged
callback, passing value
as a parameter. If
groupValue
and value
match, this radio will be selected. Most widgets
will respond to onChanged
by calling State.setState to update the
radio button's groupValue
.
Implementation
const YaruRadio({
super.key,
required this.value,
required this.groupValue,
this.toggleable = false,
required this.onChanged,
this.selectedColor,
this.checkmarkColor,
this.focusNode,
this.autofocus = false,
this.mouseCursor,
this.statesController,
}) : assert(toggleable || value != null);