YaruRadio<T> constructor

const YaruRadio<T>({
  1. Key? key,
  2. required T value,
  3. required T? groupValue,
  4. bool toggleable = false,
  5. required ValueChanged<T?>? onChanged,
  6. Color? selectedColor,
  7. Color? checkmarkColor,
  8. FocusNode? focusNode,
  9. bool autofocus = false,
  10. MouseCursor? mouseCursor,
  11. 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);