toggleable property

bool toggleable
final

Set to true if this radio button is allowed to be returned to an indeterminate state by selecting it again when selected.

To indicate returning to an indeterminate state, RadioGroup.onChanged of the RadioGroup above the widget tree will be called with null.

If true, RadioGroup.onChanged is called with value when selected while RadioGroup.groupValue != value, and with null when selected again while RadioGroup.groupValue == value.

If false, RadioGroup.onChanged will be called with value when it is selected while RadioGroup.groupValue != value, and only by selecting another radio button in the group (i.e. changing the value of RadioGroup.groupValue) can this radio button be unselected.

The default is false.

This example shows how to enable deselecting a radio button by setting the toggleable attribute.
link

To create a local project with this code sample, run:
flutter create --sample=cupertino.CupertinoRadio.toggleable.1 mysample

Implementation

final bool toggleable;