我是第一次接触flutter。最近我正在做一个应用程序,它的主要功能是添加提醒到日历。我现在使用"device_calendar“包将事件添加到日历应用程序中,问题是我可以创建事件,但我就是不能创建事件的提醒。例如,我在下午4:30创建了一个事件,我只能在Calendar App中看到它,当它真正到达下午4:30时,它不会提醒我,这会造成很多不便。谁能告诉我如何使用"device_calendar“包添加提醒,或者告诉我一些使用flutter在日历应用中添加事件和提醒的方法。提前感谢!
发布于 2019-03-01 17:51:45
我想你能处理好flutter_local_notification
计划本地通知:
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);https://stackoverflow.com/questions/54940848
复制相似问题