Radio<T> constructor

const Radio<T>({Key key, @required T value, @required T groupValue, @required ValueChanged<T> onChanged, Color activeColor, MaterialTapTargetSize materialTapTargetSize })

Creates a material design radio button.

The radio button itself does not maintain any state. Instead, when the radio button is selected, the widget calls the onChanged callback. Most widgets that use a radio button will listen for the onChanged callback and rebuild the radio button with a new groupValue to update the visual appearance of the radio button.

The following arguments are required:

  • value and groupValue together determine whether the radio button is selected.
  • onChanged is called when the user selects this radio button.

Implementation

const Radio({
  Key key,
  @required this.value,
  @required this.groupValue,
  @required this.onChanged,
  this.activeColor,
  this.materialTapTargetSize,
}) : super(key: key);