RadioGroup constructor
RadioGroup({
- String? label,
- String? name,
- Object? value,
- List<
RadioOption> options = const [], - bool required = false,
- bool disabled = false,
- String? error,
- FormErrors? errors,
- String? helpText,
- String? className,
- Map<
String, Object?> props = const {}, - Map<
String, Object?> style = const {}, - DartStyle? dartStyle,
- void onChanged(
- Object event
Creates a radio group field.
Implementation
RadioGroup({
String? label,
String? name,
Object? value,
List<RadioOption> options = const [],
bool required = false,
bool disabled = false,
String? error,
FormErrors? errors,
String? helpText,
String? className,
Map<String, Object?> props = const {},
Map<String, Object?> style = const {},
DartStyle? dartStyle,
void Function(Object event)? onChanged,
}) : super(
'fieldset',
props: mergeComponentProps(
{
...props,
if (disabled) 'disabled': true,
if (resolveFieldError(name: name, error: error, errors: errors) !=
null)
'aria-invalid': 'true',
},
className: className,
defaultStyle: fieldWrapperStyle,
dartStyle: dartStyle,
style: style,
),
children: _children(
label: label,
name: name,
value: value,
options: options,
required: required,
disabled: disabled,
error: resolveFieldError(name: name, error: error, errors: errors),
helpText: helpText,
onChanged: onChanged,
),
);