DateFieldState constructor

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

Creates a new instance of DateFieldState.

  • value: The initial date value of the field.
  • label: The label or name of the date input form field (required).
  • rules: The list of validation rules to apply to the date field (default is an empty list).

Implementation

DateFieldState(
  DateTime? value, {
  required String label,
  String? error,
  List<ValidationRule<DateTime?>> rules = const [],
}) : super(
        value: value,
        label: label,
        error: error,
        rules: rules,
      );