CheckboxFieldState<T> constructor

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

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,
      );