toggleable property Null safety

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, onChanged will be called with null.

If true, onChanged can be called with value when selected while groupValue != value, or with null when selected again while groupValue == value.

If false, onChanged will be called with value when it is selected while groupValue != value, and only by selecting another radio button in the group (i.e. changing the value of 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.
To create a local project with this code sample, run:
flutter create --sample=material.Radio.toggleable.1 mysample

Implementation

final bool toggleable;