TimePickerSheet constructor

TimePickerSheet({
  1. Key? key,
  2. required String sheetTitle,
  3. required String minuteTitle,
  4. required String hourTitle,
  5. required String saveButtonText,
  6. DateTime? initialDateTime,
  7. int minuteInterval = 15,
  8. int hourInterval = 1,
  9. int minHour = 0,
  10. int maxHour = 24,
  11. int minMinute = 0,
  12. int maxMinute = 60,
  13. bool twoDigit = true,
  14. IconData sheetCloseIcon = Icons.close,
  15. Color sheetCloseIconColor = Colors.redAccent,
  16. Color saveButtonColor = Colors.redAccent,
  17. TextStyle sheetTitleStyle = const TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
  18. TextStyle hourTitleStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.redAccent, fontSize: 16),
  19. TextStyle minuteTitleStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.redAccent, fontSize: 16),
  20. TextStyle wheelNumberItemStyle = const TextStyle(fontSize: 14),
  21. TextStyle wheelNumberSelectedStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.redAccent, fontSize: 16),
})

Implementation

TimePickerSheet({
  Key? key,
  required this.sheetTitle,
  required this.minuteTitle,
  required this.hourTitle,
  required this.saveButtonText,
  this.initialDateTime,
  this.minuteInterval = 15,
  this.hourInterval = 1,
  this.minHour = 0,
  this.maxHour = 24,
  this.minMinute = 0,
  this.maxMinute = 60,
  this.twoDigit = true,
  this.sheetCloseIcon = Icons.close,
  this.sheetCloseIconColor = Colors.redAccent,
  this.saveButtonColor = Colors.redAccent,
  this.sheetTitleStyle = const TextStyle(
    fontWeight: FontWeight.bold,
    fontSize: 16,
  ),
  this.hourTitleStyle = const TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.redAccent,
    fontSize: 16,
  ),
  this.minuteTitleStyle = const TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.redAccent,
    fontSize: 16,
  ),
  this.wheelNumberItemStyle = const TextStyle(
    fontSize: 14,
  ),
  this.wheelNumberSelectedStyle = const TextStyle(
    fontWeight: FontWeight.bold,
    color: Colors.redAccent,
    fontSize: 16,
  ),
})  : assert(minHour >= 0 && minHour <= 24),
      assert(maxHour >= 0 && maxHour <= 24),
      assert(minMinute >= 0 && maxMinute <= 60),
      assert(maxMinute >= 0 && maxMinute <= 60),
      super(key: key);