TimeModelBinding constructor

TimeModelBinding({
  1. Key? key,
  2. required Time initialTime,
  3. required Widget child,
  4. required void onChange(
    1. Time
    ),
  5. void onChangeDateTime(
    1. DateTime
    )?,
  6. void onCancel()?,
  7. bool is24HrFormat = false,
  8. bool? displayHeader,
  9. Color? accentColor,
  10. bool ltrMode = true,
  11. Color? unselectedColor,
  12. String cancelText = 'cancel',
  13. String okText = 'ok',
  14. bool isOnValueChangeMode = false,
  15. Image? sunAsset,
  16. Image? moonAsset,
  17. bool blurredBackground = false,
  18. Color? backgroundColor,
  19. double? borderRadius,
  20. double? elevation,
  21. EdgeInsets? dialogInsetPadding,
  22. EdgeInsets? contentPadding,
  23. TimePickerInterval? minuteInterval,
  24. TimePickerInterval? secondInterval,
  25. bool? disableMinute,
  26. bool? disableHour,
  27. double? maxHour,
  28. double? maxMinute,
  29. double? maxSecond,
  30. double? minHour,
  31. double? minMinute,
  32. double? minSecond,
  33. String? hourLabel,
  34. String? minuteLabel,
  35. String? secondLabel,
  36. String amLabel = 'am',
  37. String pmLabel = 'pm',
  38. bool isInlineWidget = false,
  39. bool focusMinutePicker = false,
  40. TextStyle okStyle = const TextStyle(fontWeight: FontWeight.bold),
  41. TextStyle cancelStyle = const TextStyle(fontWeight: FontWeight.bold),
  42. TextStyle? hmsStyle,
  43. ButtonStyle? buttonStyle,
  44. ButtonStyle? cancelButtonStyle,
  45. double? buttonsSpacing,
  46. double? wheelHeight,
  47. double? wheelMagnification,
  48. bool hideButtons = false,
  49. bool disableAutoFocusToNextInput = false,
  50. double width = 0,
  51. double? height,
  52. bool showSecondSelector = false,
  53. bool showCancelButton = true,
  54. TimeOfDay? sunrise,
  55. TimeOfDay? sunset,
  56. int? duskSpanInMinutes,
})

Constructor for the Widget

Implementation

TimeModelBinding({
  Key? key,
  required this.initialTime,
  required this.child,
  required this.onChange,
  this.onChangeDateTime,
  this.onCancel,
  this.is24HrFormat = false,
  this.displayHeader,
  this.accentColor,
  this.ltrMode = true,
  this.unselectedColor,
  this.cancelText = 'cancel',
  this.okText = 'ok',
  this.isOnValueChangeMode = false,
  this.sunAsset,
  this.moonAsset,
  this.blurredBackground = false,
  Color? backgroundColor,
  this.borderRadius,
  this.elevation,
  this.dialogInsetPadding,
  this.contentPadding,
  this.minuteInterval,
  this.secondInterval,
  this.disableMinute,
  this.disableHour,
  this.maxHour,
  this.maxMinute,
  this.maxSecond,
  this.minHour,
  this.minMinute,
  this.minSecond,
  this.hourLabel,
  this.minuteLabel,
  this.secondLabel,
  this.amLabel = 'am',
  this.pmLabel = 'pm',
  this.isInlineWidget = false,
  this.focusMinutePicker = false,
  this.okStyle = const TextStyle(fontWeight: FontWeight.bold),
  this.cancelStyle = const TextStyle(fontWeight: FontWeight.bold),
  this.hmsStyle,
  this.buttonStyle,
  this.cancelButtonStyle,
  this.buttonsSpacing,
  double? wheelHeight,
  double? wheelMagnification,
  this.hideButtons = false,
  this.disableAutoFocusToNextInput = false,
  this.width = 0,
  double? height,
  this.showSecondSelector = false,
  this.showCancelButton = true,
  this.sunrise,
  this.sunset,
  this.duskSpanInMinutes,
})  : height = height ?? 260,
      wheelHeight = wheelHeight ?? 100,
      wheelMagnification = wheelMagnification ?? 1.0,
      backgroundColor = backgroundColor ?? Colors.white,
      super(key: key);