FormeFluentDatePicker constructor
FormeFluentDatePicker({
- Key? key,
- String? name,
- DateTime? initialValue,
- FormeAsyncValidator<
DateTime?> ? asyncValidator, - Duration? asyncValidatorDebounce,
- AutovalidateMode? autovalidateMode,
- FormeFieldDecorator<
DateTime?> ? decorator, - bool enabled = true,
- FocusNode? focusNode,
- FormeFieldInitialized<
DateTime?> ? onInitialized, - FormeFieldSetter<
DateTime?> ? onSaved, - FormeFieldStatusChanged<
DateTime?> ? onStatusChanged, - int? order,
- bool quietlyValidate = false,
- bool readOnly = false,
- bool requestFocusOnUserInteraction = true,
- FormeFieldValidationFilter<
DateTime?> ? validationFilter, - FormeValidator<
DateTime?> ? validator, - bool autofocus = false,
- EdgeInsetsGeometry contentPadding = kPickerContentPadding,
- String? header,
- TextStyle? headerStyle,
- VoidCallback? onCancel,
- double popupHeight = kPickerPopupHeight,
- int? endYear,
- List<
DatePickerField> ? fieldOrder, - Locale? locale,
- bool showDay = true,
- bool showMonth = true,
- bool showYear = true,
- 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();
},
);
},
);