RadioGroupFieldState<T> constructor
RadioGroupFieldState<T> (
- List<
RadioButtonFieldState< radioButtons, {T> > - required String label,
- required T value,
- String? error,
- List<
ValidationRule< rules = const [],T> >
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 isnull
).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,
);