I am a little uncertain as to how I could go about doing this task and was hoping for some clarification.
The APP: It reminds people to water their plants and the user can specify how often they wish to do so.
The problem I am facing is how I can go about sending the local notifications to the user. Instead of setting up an individual notification for each new plant they have with a scheduled time to go off. I was hoping I could specify a time of the day (say 8:00 in the morning) where my app runs through all my plants and checks if any require watering today. If they do, it then tells the user through a local notification saying for instance "You have 5 plants to water today" and when they click on it they go through to the app which shows them what plants they are.
Now I am still a novice at Android/Flutter development and just a little unsure what the best practices are for this? Hope I was clear enough in what I said, happy to answer any further questions. Thanks in advance for any help.
After the Initialization, the notification can be scheduled using zonedschedule() method. In that, we should give notification details like Title, description, etc. Android and iOS get their own notification details like android has channels, so we should give channel id, channel name, importance, priority, etc.
Foreground and Notification messages Notification messages which arrive while the application is in the foreground will not display a visible notification by default, on both Android and iOS. It is, however, possible to override this behavior: On Android, you must create a "High Priority" notification channel.
First you have to create a notification service class and an instance of notification plugin. Then 1 and 2 from above tasks list. You have to check your settings and icon name accordingly.
I think that this package will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With