Skip to content
On this page

RadioGroup

A group of mutually exclusive choices.

RadioGroup in FluttyUIRadioGroup in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

RadioGroup

const RadioGroup({
  super.key,
  this.size,
  required this.options,
  required this.value,
  required this.onChanged,
  this.direction = RadioGroupDirection.vertical,
  this.spacing,
  this.optionSpacing,
  this.radioSize,
  this.activeColor,
  this.inactiveColor,
  this.disabledColor,
  this.textColor,
  this.descriptionColor,
  this.fontSize,
  this.descriptionFontSize,
  this.indicatorAlignment = RadioIndicatorAlignment.leading,
  this.showDividers = false,
  this.dividerColor,
  this.optionPadding,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
optionsList<RadioOption<T>>Yes—
valueT?Yes—
onChangedValueChanged<T?>?Yes—
directionRadioGroupDirectionNoRadioGroupDirection.vertical
spacingdouble?Nonull
optionSpacingdouble?Nonull
radioSizedouble?Nonull
activeColorColor?Nonull
inactiveColorColor?Nonull
disabledColorColor?Nonull
textColorColor?Nonull
descriptionColorColor?Nonull
fontSizedouble?Nonull
descriptionFontSizedouble?Nonull
indicatorAlignmentRadioIndicatorAlignmentNoRadioIndicatorAlignment.leading
showDividersboolNofalse
dividerColorColor?Nonull
optionPaddingEdgeInsetsGeometry?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/forms/radio_group/radio_group.dart

This reference is generated from the RadioGroup declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI