我正在创建一个生日提醒应用程序在扑动,我已经做了一切,除了在特定的出生日期设置日程通知输入用户 &g



我已经实现了这些东西

  1. Databas。
  2. 显示列表视图
  3. 有一个添加按钮来添加用户名,出生日期
  4. 本地通知以及

问题是,如何在用户输入的特定日期设置通知提醒,以便应用程序提醒我该人的生日

我觉得你应该试试下面简单的依赖。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));

最新更新