ShadTimePicker constructor

const ShadTimePicker({
  1. Key? key,
  2. Axis? axis,
  3. double? spacing,
  4. double? runSpacing,
  5. bool? jumpToNextFieldWhenFilled,
  6. ValueChanged<ShadTimeOfDay>? onChanged,
  7. ShadTimeOfDay? initialValue,
  8. Widget? hourLabel,
  9. Widget? minuteLabel,
  10. Widget? secondLabel,
  11. Widget? hourPlaceholder,
  12. Widget? minutePlaceholder,
  13. Widget? secondPlaceholder,
  14. Widget? leading,
  15. Widget? trailing,
  16. WrapAlignment? alignment,
  17. WrapAlignment? runAlignment,
  18. WrapCrossAlignment? crossAxisAlignment,
  19. int maxHour = 23,
  20. int maxMinute = 59,
  21. int maxSecond = 59,
  22. int minHour = 0,
  23. int minMinute = 0,
  24. int minSecond = 0,
  25. double? gap,
  26. TextStyle? style,
  27. TextStyle? labelStyle,
  28. TextStyle? placeholderStyle,
  29. double? fieldWidth,
  30. EdgeInsetsGeometry? fieldPadding,
  31. ShadDecoration? fieldDecoration,
  32. ShadTimePickerController? controller,
  33. bool enabled = true,
  34. WidgetBuilder? keyboardToolbarBuilder,
  35. bool? showHours,
  36. bool? showSeconds,
  37. 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''',
     );