I build an Android app in Flutter that reminds people at set times of day. The screens took a week. Making the reminder actually arrive took longer, and almost none of it was Flutter code.
These are the notes I wish I had at the start. They cover a scheduled local reminder, not a push notification from a server.
A Dart timer is not a scheduler
Timer.periodic and Future.delayed run while your app process is alive and awake. Once the screen goes off and the system reclaims the process, the callback is gone. Nothing tells the user. The reminder simply never arrives, and the review says the app is broken.
Anything that has to survive that has to be scheduled with the platform, not with Dart.
Schedule with AlarmManager, from Kotlin
In my app the Dart side works out the next reminder time and calls a platform channel. The Kotlin side sets an alarm with AlarmManager and a PendingIntent that fires a BroadcastReceiver .…