Reputation: 33
I am new to flutter. Recently I am doing an app whose main function is add reminders to the Calendar. I am now using the "device_calendar" package to add events into the Calendar app, the problem is that I can create an event but I just can't create a reminder to the event. For example, I created an event at 4:30 p.m., I can only see it in the Calendar App, it won't remind me when it actually comes to 4:30 p.m., which causes a lot of inconvenience. Can someone tell me how to add reminders using "device_calendar" package, or just tell me some methods about adding events and reminders into the Calendar App with flutter. Thanks in advance!
Upvotes: 0
Views: 8250
Reputation: 25
But Flutter_Local_Notification fails to remaind after when device is rebooted. May be you can set remainder in google calender in the user's account.
Upvotes: 0
Reputation: 2142
I think you can handle with flutter_local_notification
Schedule localnotification:
var scheduledNotificationDateTime =
new DateTime.now().add(new Duration(seconds: 5));
var androidPlatformChannelSpecifics =
new AndroidNotificationDetails('your other channel id',
'your other channel name', 'your other channel description');
var iOSPlatformChannelSpecifics =
new IOSNotificationDetails();
NotificationDetails platformChannelSpecifics = new NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(
0,
'scheduled title',
'scheduled body',
scheduledNotificationDateTime,
platformChannelSpecifics);
Upvotes: 7