I have a prayer-timing App with notifications to be shown for 5 prayers everyday.
For simplicity let's assume there are 5 events(prayers) everyday.
- 5:00
- 6:00
- 7:00
- 8:00
- 9:00
I want to schedule a notification for every event.
Till here, there is no problem, i can use the Flutter_local_notifications package and use the "daily" method to schedule these 5 notifications daily.
The problem is that these timings change every 2-3 days, so the timings of the notifications also have to be changed in that period.
For now i have written the code in such a way that, whenever the user opens the app, the notifications are scheduled again. This works, but the app freezes for a few seconds on start-up which looks really bad.
Is there any other way to do it?
EDIT : The prayer timings for the whole of next year are calculated in the app, the only problem is to schedule them.