RadioGroupFieldState<T> constructor

RadioGroupFieldState<T>(
  1. List<RadioButtonFieldState<T>> radioButtons, {
  2. required String label,
  3. required T value,
  4. String? error,
  5. List<ValidationRule<T>> rules = const [],
})

Creates a new instance of RadioGroupFieldState.

  • radioButtons: The list of individual radio button field states within the group (required).
  • label: The label or name of the radio button group form field (required).
  • value: The initial value of the radio button group (default is null).
  • rules: The list of validation rules to apply to the radio button group field (default is an empty list).

Implementation

RadioGroupFieldState(
  this.radioButtons, {
  required String label,
  required T value,
  String? error,
  List<ValidationRule<T>> rules = const [],
}) : super(
        value: value,
        label: label,
        error: error,
        rules: rules,
      );