Home > Enterprise >  How to schedule multiple time specific local notifications in flutter
How to schedule multiple time specific local notifications in flutter

Time:02-08

I am developing water drinking reminder app with flutter. I want to schedule a list of time specified local notifications that user can add to this list and delete from this list. like this

Any help would appreciate, Thanks.

CodePudding user response:

Try this package. It has many features including seconds precision scheduled notifications.

CodePudding user response:

You can use flutter_local_notifications plugin, it can send scheduled, instant and also repeating notifications

await flutterLocalNotificationsPlugin.zonedSchedule(
0,
'scheduled title',
'scheduled body',
tz.TZDateTime.now(tz.local).add(const Duration(seconds: 5)),
const NotificationDetails(
    android: AndroidNotificationDetails(
        'your channel id', 'your channel name',
        channelDescription: 'your channel description')),
androidAllowWhileIdle: true,
uiLocalNotificationDateInterpretation:
    UILocalNotificationDateInterpretation.absoluteTime);

This example will schedule a notification that appears after 5 seconds.

  •  Tags:  
  • Related