Radio<T> constructor
- Key? key,
- required T value,
- @Deprecated('Use a RadioGroup ancestor to manage group value instead. ' 'This feature was deprecated after v3.32.0-0.0.pre.') T? groupValue,
- @Deprecated('Use RadioGroup to handle value change instead. ' 'This feature was deprecated after v3.32.0-0.0.pre.') ValueChanged<
T?> ? onChanged, - MouseCursor? mouseCursor,
- bool toggleable = false,
- Color? activeColor,
- MaterialStateProperty<
Color?> ? fillColor, - Color? focusColor,
- Color? hoverColor,
- MaterialStateProperty<
Color?> ? overlayColor, - double? splashRadius,
- MaterialTapTargetSize? materialTapTargetSize,
- VisualDensity? visualDensity,
- FocusNode? focusNode,
- bool autofocus = false,
- bool? enabled,
- RadioGroupRegistry<
T> ? groupRegistry, - WidgetStateProperty<
Color?> ? backgroundColor, - BorderSide? side,
- WidgetStateProperty<
double?> ? innerRadius,
Creates a Material Design radio button.
This widget typically has a RadioGroup ancestor, which takes in a
RadioGroup.groupValue, and the Radio under it with matching value
will be selected.
The value
is required.
Implementation
const Radio({
super.key,
required this.value,
@Deprecated(
'Use a RadioGroup ancestor to manage group value instead. '
'This feature was deprecated after v3.32.0-0.0.pre.',
)
this.groupValue,
@Deprecated(
'Use RadioGroup to handle value change instead. '
'This feature was deprecated after v3.32.0-0.0.pre.',
)
this.onChanged,
this.mouseCursor,
this.toggleable = false,
this.activeColor,
this.fillColor,
this.focusColor,
this.hoverColor,
this.overlayColor,
this.splashRadius,
this.materialTapTargetSize,
this.visualDensity,
this.focusNode,
this.autofocus = false,
this.enabled,
this.groupRegistry,
this.backgroundColor,
this.side,
this.innerRadius,
}) : _radioType = _RadioType.material,
useCupertinoCheckmarkStyle = false;