semanticsInMutuallyExclusiveGroup property

bool semanticsInMutuallyExclusiveGroup
final

Whether this toggle is one option of a set where exactly one is on, such as a choice chip or a single-choice filter, rather than an independent on/off toggle; for assistive technologies only.

When false (the default), the toggle reads as a switch that is on or off. When true, it reads as a radio button of a mutually exclusive group, checked when value is true, in place of the switch: iOS reads a toggled node outside such a group as a switch, which says nothing of the other options. On iOS and macOS the checked toggle is also reported as selected, as Flutter's radio buttons are, since iOS reads a radio button's selected trait rather than its checked state.

onChanged still receives !value: a set where the chosen option stays chosen when tapped again ignores false.

Implementation

final bool semanticsInMutuallyExclusiveGroup;