TimePickerSheet constructor
TimePickerSheet({
- Key? key,
- required String sheetTitle,
- required String minuteTitle,
- required String hourTitle,
- required String saveButtonText,
- DateTime? initialDateTime,
- int minuteInterval = 15,
- int hourInterval = 1,
- int minHour = 0,
- int maxHour = 24,
- int minMinute = 0,
- int maxMinute = 60,
- bool twoDigit = true,
- IconData sheetCloseIcon = Icons.close,
- Color sheetCloseIconColor = Colors.redAccent,
- Color saveButtonColor = Colors.redAccent,
- TextStyle sheetTitleStyle = const TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
- TextStyle hourTitleStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.redAccent, fontSize: 16),
- TextStyle minuteTitleStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.redAccent, fontSize: 16),
- TextStyle wheelNumberItemStyle = const TextStyle(fontSize: 14),
- 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);