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