RadioButton
RadioButton renders the selected state of one option.
The application owns group exclusivity by storing one selected value.
Model one selected value
Section titled “Model one selected value”Column { RadioButton("Automatic", mode == Mode::Automatic) .OnChanged([mode](bool selected) { if (selected) { mode = Mode::Automatic; } }), RadioButton("Manual", mode == Mode::Manual) .OnChanged([mode](bool selected) { if (selected) { mode = Mode::Manual; } }),}.With(Spacing(8.0F))Construct it with bool or State<bool>, optionally preceded by a StringVariant label.
Do not keep a separate boolean state for every option when one enum or identifier describes the group more accurately.
Interaction and theme
Section titled “Interaction and theme”RadioButtonStyle controls geometry, selected and unselected colors, disabled colors, border, inner dot, state layer, and transition duration.
The component exposes radio-button role, selected state, label, focus, and activation semantics.
- Constructors:
RadioButton(bool|State<bool>)andRadioButton(StringVariant, bool|State<bool>). - Event:
.OnChanged(function)withbool. - Theme style:
RadioButtonStyle.
For a compact fixed group with one selected index, use SegmentedButton.

