Hotfix show todos
parent
5a3eac1be2
commit
7520da6e13
|
@ -104,8 +104,7 @@ List<TZDateTime> createTZDateTimes(
|
||||||
final DateTime date = DateTime(now.year, now.month, now.day, selectedHours,
|
final DateTime date = DateTime(now.year, now.month, now.day, selectedHours,
|
||||||
selectedMinutes, 0, 0, 0)
|
selectedMinutes, 0, 0, 0)
|
||||||
.add(Duration(days: i));
|
.add(Duration(days: i));
|
||||||
if (selectedDaysInt.contains(date.weekday) &&
|
if (selectedDaysInt.contains(date.weekday)) {
|
||||||
date.isAfter(DateTime.now())) {
|
|
||||||
tzDateTimes.add(TZDateTime.local(date.year, date.month, date.day,
|
tzDateTimes.add(TZDateTime.local(date.year, date.month, date.day,
|
||||||
selectedHours, selectedMinutes, 0, 0, 0)
|
selectedHours, selectedMinutes, 0, 0, 0)
|
||||||
.subtract(offset));
|
.subtract(offset));
|
||||||
|
|
|
@ -52,6 +52,7 @@ class NotificationService {
|
||||||
|
|
||||||
Future<void> setNotification(
|
Future<void> setNotification(
|
||||||
int id, String title, String body, TZDateTime tzDateTime) async {
|
int id, String title, String body, TZDateTime tzDateTime) async {
|
||||||
|
if (tzDateTime.isAfter(DateTime.now())) {
|
||||||
await flutterLocalNotificationsPlugin.zonedSchedule(
|
await flutterLocalNotificationsPlugin.zonedSchedule(
|
||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
|
@ -80,3 +81,4 @@ class NotificationService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue