RadioListTile<T> constructor

const RadioListTile<T>({Key key, @required T value, @required T groupValue, @required ValueChanged<T> onChanged, Color activeColor, Widget title, Widget subtitle, bool isThreeLine: false, bool dense, Widget secondary, bool selected: false, ListTileControlAffinity controlAffinity: ListTileControlAffinity.platform })

Creates a combination of a list tile and a radio button.

The radio tile 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 tile 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 RadioListTile({
  Key key,
  @required this.value,
  @required this.groupValue,
  @required this.onChanged,
  this.activeColor,
  this.title,
  this.subtitle,
  this.isThreeLine = false,
  this.dense,
  this.secondary,
  this.selected = false,
  this.controlAffinity = ListTileControlAffinity.platform,
}) : assert(isThreeLine != null),
     assert(!isThreeLine || subtitle != null),
     assert(selected != null),
     assert(controlAffinity != null),
     super(key: key);