|
|
|
|
@ -171,6 +171,24 @@ class _AppTimerState extends State<AppTimer> {
|
|
|
|
|
showTimePicker(
|
|
|
|
|
context: context,
|
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
|
builder: (BuildContext context, Widget? child) {
|
|
|
|
|
final ThemeData currentTheme = Theme.of(context);
|
|
|
|
|
return Theme(
|
|
|
|
|
data: currentTheme.copyWith(
|
|
|
|
|
timePickerTheme: TimePickerThemeData(
|
|
|
|
|
dialHandColor: AppColor.primary10,
|
|
|
|
|
dialBackgroundColor: Colors.grey.withOpacity(0.1),
|
|
|
|
|
hourMinuteColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.grey.withOpacity(0.1)),
|
|
|
|
|
dayPeriodColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.transparent),
|
|
|
|
|
dayPeriodTextColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? Colors.white : AppColor.primary10),
|
|
|
|
|
dayPeriodBorderSide: BorderSide(color: Colors.grey.withOpacity(0.2)),
|
|
|
|
|
entryModeIconColor: AppColor.primary10,
|
|
|
|
|
),
|
|
|
|
|
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(foregroundColor: AppColor.primary10)),
|
|
|
|
|
),
|
|
|
|
|
child: child!,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
).then((selectedTime) {
|
|
|
|
|
if (selectedTime != null) {
|
|
|
|
|
_pickerStartAt = DateTime(selectedDate.year, selectedDate.month, selectedDate.day, selectedTime.hour, selectedTime.minute);
|
|
|
|
|
@ -205,6 +223,24 @@ class _AppTimerState extends State<AppTimer> {
|
|
|
|
|
showTimePicker(
|
|
|
|
|
context: context,
|
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
|
builder: (BuildContext context, Widget? child) {
|
|
|
|
|
final ThemeData currentTheme = Theme.of(context);
|
|
|
|
|
return Theme(
|
|
|
|
|
data: currentTheme.copyWith(
|
|
|
|
|
timePickerTheme: TimePickerThemeData(
|
|
|
|
|
dialHandColor: AppColor.primary10,
|
|
|
|
|
dialBackgroundColor: Colors.grey.withOpacity(0.1),
|
|
|
|
|
hourMinuteColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.grey.withOpacity(0.1)),
|
|
|
|
|
dayPeriodColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? AppColor.primary10 : Colors.transparent),
|
|
|
|
|
dayPeriodTextColor: MaterialStateColor.resolveWith((states) => states.contains(MaterialState.selected) ? Colors.white : AppColor.primary10),
|
|
|
|
|
dayPeriodBorderSide: BorderSide(color: Colors.grey.withOpacity(0.2)),
|
|
|
|
|
entryModeIconColor: AppColor.primary10,
|
|
|
|
|
),
|
|
|
|
|
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(foregroundColor: AppColor.primary10)),
|
|
|
|
|
),
|
|
|
|
|
child: child!,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
).then((selectedTime) {
|
|
|
|
|
if (selectedTime != null) {
|
|
|
|
|
selectedDate = selectedDate.add(Duration(hours: selectedTime.hour, minutes: selectedTime.minute));
|
|
|
|
|
|