CheckboxGroupFieldState<T> constructor
CheckboxGroupFieldState<T> (
- List<
CheckboxFieldState< checkboxes, {T> > - required String label,
- String? error,
- Set<
T> ? value, - List<
ValidationRule< rules = const [],Set< >T> >
Creates a new instance of CheckboxGroupFieldState.
checkboxes
: The list of individual checkbox field states within the group (required).label
: The label or name of the checkbox group form field (required).value
: The initial value of the checkbox group (default isnull
).rules
: The list of validation rules to apply to the checkbox group field (default is an empty list).
Implementation
CheckboxGroupFieldState(
this.checkboxes, {
required String label,
String? error,
Set<T>? value,
List<ValidationRule<Set<T>>> rules = const [],
}) : super(value: value ?? <T>{}, label: label, error: error, rules: rules);