FormeFluentDatePicker constructor

FormeFluentDatePicker({
  1. Key? key,
  2. String? name,
  3. DateTime? initialValue,
  4. FormeAsyncValidator<DateTime?>? asyncValidator,
  5. Duration? asyncValidatorDebounce,
  6. AutovalidateMode? autovalidateMode,
  7. FormeFieldDecorator<DateTime?>? decorator,
  8. bool enabled = true,
  9. FocusNode? focusNode,
  10. FormeFieldInitialized<DateTime?>? onInitialized,
  11. FormeFieldSetter<DateTime?>? onSaved,
  12. FormeFieldStatusChanged<DateTime?>? onStatusChanged,
  13. int? order,
  14. bool quietlyValidate = false,
  15. bool readOnly = false,
  16. bool requestFocusOnUserInteraction = true,
  17. FormeFieldValidationFilter<DateTime?>? validationFilter,
  18. FormeValidator<DateTime?>? validator,
  19. bool autofocus = false,
  20. EdgeInsetsGeometry contentPadding = kPickerContentPadding,
  21. String? header,
  22. TextStyle? headerStyle,
  23. VoidCallback? onCancel,
  24. double popupHeight = kPickerPopupHeight,
  25. int? endYear,
  26. List<DatePickerField>? fieldOrder,
  27. Locale? locale,
  28. bool showDay = true,
  29. bool showMonth = true,
  30. bool showYear = true,
  31. int? startYear,
})

Implementation

FormeFluentDatePicker({
  super.key,
  super.name,
  super.initialValue,
  super.asyncValidator,
  super.asyncValidatorDebounce,
  super.autovalidateMode,
  super.decorator,
  super.enabled = true,
  super.focusNode,
  super.onInitialized,
  super.onSaved,
  super.onStatusChanged,
  super.order,
  super.quietlyValidate = false,
  super.readOnly = false,
  super.requestFocusOnUserInteraction = true,
  super.validationFilter,
  super.validator,
  this.autofocus = false,
  this.contentPadding = kPickerContentPadding,
  this.header,
  this.headerStyle,
  this.onCancel,
  this.popupHeight = kPickerPopupHeight,
  this.endYear,
  this.fieldOrder,
  this.locale,
  this.showDay = true,
  this.showMonth = true,
  this.showYear = true,
  this.startYear,
}) : super.allFields(
        builder: (state) {
          return DatePicker(
            showDay: showDay,
            showMonth: showMonth,
            showYear: showYear,
            startYear: startYear,
            endYear: endYear,
            locale: locale,
            fieldOrder: fieldOrder,
            onCancel: onCancel,
            header: header,
            headerStyle: headerStyle,
            contentPadding: contentPadding,
            popupHeight: popupHeight,
            focusNode: state.focusNode,
            autofocus: autofocus,
            selected: state.value,
            onChanged: readOnly
                ? null
                : (value) {
                    state.didChange(value);
                    state.requestFocusOnUserInteraction();
                  },
          );
        },
      );