RadioGroup constructor

RadioGroup({
  1. String? label,
  2. String? name,
  3. Object? value,
  4. List<RadioOption> options = const [],
  5. bool required = false,
  6. bool disabled = false,
  7. String? error,
  8. FormErrors? errors,
  9. String? helpText,
  10. String? className,
  11. Map<String, Object?> props = const {},
  12. Map<String, Object?> style = const {},
  13. DartStyle? dartStyle,
  14. void onChanged(
    1. 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,
       ),
     );