ShadTimePicker constructor
const
ShadTimePicker({
- Key? key,
- Axis? axis,
- double? spacing,
- double? runSpacing,
- bool? jumpToNextFieldWhenFilled,
- ValueChanged<
ShadTimeOfDay> ? onChanged, - ShadTimeOfDay? initialValue,
- 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,
- double? gap,
- TextStyle? style,
- TextStyle? labelStyle,
- TextStyle? placeholderStyle,
- double? fieldWidth,
- EdgeInsetsGeometry? fieldPadding,
- ShadDecoration? fieldDecoration,
- ShadTimePickerController? controller,
- bool enabled = true,
- WidgetBuilder? keyboardToolbarBuilder,
- bool? showHours,
- bool? showSeconds,
- bool? showMinutes,
Creates a ShadTimePicker with the primary variant (24-hour format).
Implementation
const ShadTimePicker({
super.key,
this.axis,
this.spacing,
this.runSpacing,
this.jumpToNextFieldWhenFilled,
this.onChanged,
this.initialValue,
this.hourLabel,
this.minuteLabel,
this.secondLabel,
this.hourPlaceholder,
this.minutePlaceholder,
this.secondPlaceholder,
this.leading,
this.trailing,
this.alignment,
this.runAlignment,
this.crossAxisAlignment,
this.maxHour = 23,
this.maxMinute = 59,
this.maxSecond = 59,
this.minHour = 0,
this.minMinute = 0,
this.minSecond = 0,
this.gap,
this.style,
this.labelStyle,
this.placeholderStyle,
this.fieldWidth,
this.fieldPadding,
this.fieldDecoration,
this.controller,
this.enabled = true,
this.keyboardToolbarBuilder,
this.showHours,
this.showSeconds,
this.showMinutes,
}) : variant = ShadTimePickerVariant.primary,
initialDayPeriod = null,
periodLabel = null,
periodPlaceholder = null,
periodHeight = null,
periodDecoration = null,
periodMinWidth = null,
assert(
false != showHours || false != showMinutes || false != showSeconds,
'''At least one of showHours, showMinutes, or showSeconds must not be false''',
);