flutter - I’m creating a birthday reminder app in flutter, I’ve done everything except setting schedule notification on the specific date of birth Enter by user
问题描述
I’ve implemented these things
- Databas.
- showing the records in list view
- There’s a add button to add user name, date of birth
- Local notification as well
Problem is ,how to setup notification reminder on the specific date enter by the user so that the app remind me the birthday of the person
解决方案
我认为你应该尝试以下简单的依赖。 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));
推荐阅读
- node.js - TypeError:将循环结构转换为 JSON 节点 js
- java - Spring session:endpointB 中的 session.getAttribute() 值变为 null,而不是在 endpointA 中的 session.setAttribute() 中设置值
- javascript - Javascript 属性在 React 中用作默认状态时显示未定义
- oracle - DBMS_PARALLEL_EXECUTE.run_task 不启动并行作业
- javascript - 单击按钮时,生成一个带有自己计数器的新按钮
- python - 通过python数据框将XML文件转换为CSV
- localization - 在 SwiftUI 中使用字符串插值进行本地化
- sapui5 - 关闭对对话框片段不起作用 - 对话框在关闭时挂起
- java - Apache Jackrabbit (JCR) 我应该使用哪个 API 进行大规模删除
- python - 使用python在linux(ubuntu)机器上打开一个excel文件