[Flutter/dart] Do not reset notifications local_notification when the app is restarted
Overview
You can easily create notifications using a library called flutter_local_notificaton.
However, if you turn off the app once after creating the notification and then launch it again, the notification will be reset and you will not receive the notification even at the specified time.
Solution
In fact, there doesn't seem to be a fundamental solution yet. So, as a temporary measure, I am recreating the notification every time the application is launched (such as main or initState () of some state).
For this reason, specify the notification date and time as absolute (month, day, and hour) rather than relative (hours from now, etc.).
Lastly
If you just turn off the app, you will be notified properly. It will be reset when the app is launched.
There was an article saying that you should write xxx in AndroidManifest, but it didn't work for me (environmental problem?)
Recent Posts
See AllWhat want to do I want to create an input form using TextField. For example, if the input content is a monetary amount, I would like to...
What want to do There is a variable that remain unchanged once the initial value is determined. However, it cannot be determined yet when...
What want to do As the title suggests. Place two widgets in one line on the screen One in the center of the screen and the other on the...
Comments