Skip to content

Radio

A form control component that allows users to select one option from a group of mutually exclusive choices. Radio buttons are ideal for presenting a small set of options where only one selection is allowed.

The RadioButton widget provides a circular selection indicator with optional label and description text. It supports various customization options including size, spacing, styling, error states, and read-only mode.

  • Single Selection: Enforces mutually exclusive selection within a group
  • Customizable: Supports various sizes, spacing, and styling options
  • Accessible: Includes proper labeling and description support
  • States: Normal, error, and read-only states

A radio button in its selected state.


A radio button in its unselected state.


A radio button displaying an error state with error coloring.


A radio button with both label and description text.


A practical example showing multiple radio buttons working together as a group.


PropertyTypeDescription
valueTThe value represented by this radio button.
groupValueT?The currently selected value for the radio button group.
onChangedValueChanged<T?>?Called when the radio button is selected.
labelString?Optional text label to display next to the radio button.
labelStyleTextStyle?Custom text style for the label.
descriptionString?Optional description text displayed below the label.
descriptionStyleTextStyle?Custom text style for the description text.
sizedoubleThe size of the radio button circle in logical pixels. Default is 20.0.
spacingdoubleThe spacing between the radio button and text content. Default is 12.0.
readOnlyboolWhether the radio button is read-only. Default is false.
isErrorboolWhether the radio button should display in an error state. Default is false.