ShadTimePickerFormField.raw constructor
ShadTimePickerFormField.raw({
- required ShadTimePickerVariant variant,
- String? id,
- Key? key,
- FormFieldSetter<
ShadTimeOfDay> ? onSaved, - Widget? label,
- Widget error(
- String error
- Widget? description,
- String? forceErrorText,
- @Deprecated('Use toValueTransformer instead') ToValueTransformer<
ShadTimeOfDay?> ? valueTransformer, - ToValueTransformer<
ShadTimeOfDay?> ? toValueTransformer, - FromValueTransformer<
ShadTimeOfDay?> ? fromValueTransformer, - VoidCallback? onReset,
- bool enabled = true,
- AutovalidateMode? autovalidateMode,
- String? restorationId,
- FormFieldValidator<
ShadTimeOfDay> ? validator, - ValueChanged<
ShadTimeOfDay?> ? onChanged, - ShadTimeOfDay? initialValue,
- ShadTimePickerController? controller,
- Axis? axis,
- double? spacing,
- double? runSpacing,
- bool? jumpToNextFieldWhenFilled,
- Widget? hourLabel,
- Widget? minuteLabel,
- Widget? secondLabel,
- Widget? hourPlaceholder,
- Widget? minutePlaceholder,
- Widget? secondPlaceholder,
- Widget? leading,
- Widget? trailing,
- WrapAlignment? alignment,
- WrapAlignment? runAlignment,
- WrapCrossAlignment? crossAxisAlignment,
- int maxHour = 23,
- int maxMinute = 59,
- int maxSecond = 59,
- int minHour = 0,
- int minMinute = 0,
- int minSecond = 0,
- ShadDayPeriod? initialDayPeriod,
- Widget? periodLabel,
- Widget? periodPlaceholder,
- double? periodHeight,
- double? periodMinWidth,
- double? gap,
- TextStyle? style,
- TextStyle? placeholderStyle,
- TextStyle? labelStyle,
- double? fieldWidth,
- EdgeInsetsGeometry? fieldPadding,
- ShadDecoration? fieldDecoration,
- ShadDecoration? periodDecoration,
- WidgetBuilder? keyboardToolbarBuilder,
- bool? showHours,
- bool? showMinutes,
- bool? showSeconds,
Implementation
ShadTimePickerFormField.raw({
required ShadTimePickerVariant variant,
super.id,
super.key,
super.onSaved,
super.label,
super.error,
super.description,
super.forceErrorText,
@Deprecated('Use toValueTransformer instead') super.valueTransformer,
super.toValueTransformer,
super.fromValueTransformer,
super.onReset,
super.enabled,
super.autovalidateMode,
super.restorationId,
super.validator,
/// {@macro ShadTimePicker.onChanged}
super.onChanged,
/// {@macro ShadTimePicker.initialValue}
super.initialValue,
/// @macro ShadTimePicker.controller
this.controller,
/// {@macro ShadTimePicker.axis}
Axis? axis,
/// {@macro ShadTimePicker.spacing}
double? spacing,
/// {@macro ShadTimePicker.runSpacing}
double? runSpacing,
/// {@macro ShadTimePicker.jumpToNextFieldWhenFilled}
bool? jumpToNextFieldWhenFilled,
/// {@macro ShadTimePicker.hourLabel}
Widget? hourLabel,
/// {@macro ShadTimePicker.minuteLabel}
Widget? minuteLabel,
/// {@macro ShadTimePicker.secondLabel}
Widget? secondLabel,
/// {@macro ShadTimePicker.hourPlaceholder}
Widget? hourPlaceholder,
/// {@macro ShadTimePicker.minutePlaceholder}
Widget? minutePlaceholder,
/// {@macro ShadTimePicker.secondPlaceholder}
Widget? secondPlaceholder,
/// {@macro ShadTimePicker.leading}
Widget? leading,
/// {@macro ShadTimePicker.trailing}
Widget? trailing,
/// {@macro ShadTimePicker.alignment}
WrapAlignment? alignment,
/// {@macro ShadTimePicker.runAlignment}
WrapAlignment? runAlignment,
/// {@macro ShadTimePicker.crossAxisAlignment}
WrapCrossAlignment? crossAxisAlignment,
/// {@macro ShadTimePicker.maxHour}
int maxHour = 23,
/// {@macro ShadTimePicker.maxMinute}
int maxMinute = 59,
/// {@macro ShadTimePicker.maxSecond}
int maxSecond = 59,
/// {@macro ShadTimePicker.minHour}
int minHour = 0,
/// {@macro ShadTimePicker.minMinute}
int minMinute = 0,
/// {@macro ShadTimePicker.minSecond}
int minSecond = 0,
/// {@macro ShadTimePicker.initialDayPeriod}
ShadDayPeriod? initialDayPeriod,
/// {@macro ShadTimePicker.periodLabel}
Widget? periodLabel,
/// {@macro ShadTimePicker.periodPlaceholder}
Widget? periodPlaceholder,
/// {@macro ShadTimePicker.periodHeight}
double? periodHeight,
/// {@macro ShadTimePicker.periodMinWidth}
double? periodMinWidth,
/// {@macro ShadTimePicker.gap}
double? gap,
/// {@macro ShadTimePicker.style}
TextStyle? style,
/// {@macro ShadTimePicker.placeholderStyle}
TextStyle? placeholderStyle,
/// {@macro ShadTimePicker.labelStyle}
TextStyle? labelStyle,
/// {@macro ShadTimePicker.fieldWidth}
double? fieldWidth,
/// {@macro ShadTimePicker.fieldPadding}
EdgeInsetsGeometry? fieldPadding,
/// {@macro ShadTimePicker.fieldDecoration}
ShadDecoration? fieldDecoration,
/// {@macro ShadTimePicker.periodDecoration}
ShadDecoration? periodDecoration,
/// {@macro ShadKeyboardToolbar.toolbarBuilder}
WidgetBuilder? keyboardToolbarBuilder,
this.showHours,
this.showMinutes,
this.showSeconds,
}) : super(
builder: (state) {
state as ShadFormBuilderTimePickerState;
return ShadTimePicker.raw(
variant: variant,
controller: state.controller,
onChanged: state.didChange,
enabled: state.enabled,
initialValue: state.initialValue,
axis: axis,
spacing: spacing,
runSpacing: runSpacing,
jumpToNextFieldWhenFilled: jumpToNextFieldWhenFilled,
hourLabel: hourLabel,
minuteLabel: minuteLabel,
secondLabel: secondLabel,
hourPlaceholder: hourPlaceholder,
minutePlaceholder: minutePlaceholder,
secondPlaceholder: secondPlaceholder,
leading: leading,
trailing: trailing,
alignment: alignment,
runAlignment: runAlignment,
crossAxisAlignment: crossAxisAlignment,
maxHour: maxHour,
maxMinute: maxMinute,
maxSecond: maxSecond,
minHour: minHour,
minMinute: minMinute,
minSecond: minSecond,
initialDayPeriod: initialDayPeriod,
periodLabel: periodLabel,
periodPlaceholder: periodPlaceholder,
periodHeight: periodHeight,
periodMinWidth: periodMinWidth,
gap: gap,
style: style,
placeholderStyle: placeholderStyle,
labelStyle: labelStyle,
fieldWidth: fieldWidth,
fieldPadding: fieldPadding,
fieldDecoration: fieldDecoration,
periodDecoration: periodDecoration,
keyboardToolbarBuilder: keyboardToolbarBuilder,
showHours: showHours,
showMinutes: showMinutes,
showSeconds: showSeconds,
);
},
);