FormeFluentTimePicker constructor
FormeFluentTimePicker({
- 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,
- HourFormat hourFormat = HourFormat.h,
- int minuteIncrement = 1,
- VoidCallback? onCancel,
- double popupHeight = kPickerPopupHeight,
Implementation
FormeFluentTimePicker({
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.hourFormat = HourFormat.h,
this.minuteIncrement = 1,
this.onCancel,
this.popupHeight = kPickerPopupHeight,
}) : super.allFields(
builder: (state) {
return TimePicker(
onCancel: onCancel,
hourFormat: hourFormat,
header: header,
headerStyle: headerStyle,
contentPadding: contentPadding,
popupHeight: popupHeight,
focusNode: state.focusNode,
autofocus: autofocus,
minuteIncrement: minuteIncrement,
selected: state.value,
onChanged: readOnly
? null
: (value) {
state.didChange(value);
state.requestFocusOnUserInteraction();
},
);
},
);