Creates a material design radio button.
The radio button itself does not maintain any state. Instead, when the state of the radio button changes, the widget calls the onChanged callback. Most widget 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.
- value and groupValue together determines whether the radio button is selected.
- onChanged is when the user selects this radio button.
Source
Radio({ Key key, @required this.value, @required this.groupValue, @required this.onChanged, this.activeColor }) : super(key: key);