I am writing a water reminder application. I want to send a notification every 2 hours at specific time intervals by using flutter_local_notifications or awesome_notifications. Its notifications should be sent every 2 hours, starting at 8 AM and ending at 6 PM or at a specified start and end time. Is there a way to do these operations?
Asked
Active
Viewed 321 times
0
-
I think this answer will help you https://stackoverflow.com/a/71171816/8544376 – Farazzz Jan 05 '23 at 14:19
1 Answers
0
you can use a package like cron https://pub.dev/packages/cron to achieve this.
cron.schedule(Schedule.parse('*/3 * * * *'), () async {
print('every three minutes');
});