我已经实现了这些东西
- Databas。
- 显示列表视图
- 有一个添加按钮来添加用户名,出生日期
- 本地通知以及
问题是,如何在用户输入的特定日期设置通知提醒,以便应用程序提醒我该人的生日
我觉得你应该试试下面简单的依赖。https://pub.dev/packages/awesome_notifications
String localTimeZone = await AwesomeNotifications().getLocalTimeZoneIdentifier();
String utcTimeZone = await AwesomeNotifications().getLocalTimeZoneIdentifier();
await AwesomeNotifications().createNotification(
content: NotificationContent(
id: id,
channelKey: 'scheduled',
title: 'Notification at every single minute',
body:
'This notification was schedule to repeat at every single minute.',
notificationLayout: NotificationLayout.BigPicture,
bigPicture: 'asset://assets/images/melted-clock.png'),
schedule: NotificationInterval(interval: /*Your Interval in Seconds (60)*/, timeZone: localTimeZone, repeats: true));