【发布时间】:2021-10-04 21:17:00
【问题描述】:
有没有办法获取已注册的预订通知的列表?
我想知道flutter本地通知时间表的数量和通知ID列表。
【问题讨论】:
-
你应该在你的解决方案尝试中发布代码 sn-p,这样人们可以更好地帮助你
有没有办法获取已注册的预订通知的列表?
我想知道flutter本地通知时间表的数量和通知ID列表。
【问题讨论】:
将此函数添加到本地通知类中,您可以从外部使用对象调用它
returnPendingNotifications() async {
final List<PendingNotificationRequest> pendingNotificationRequests =
await flutterLocalNotificationsPlugin.pendingNotificationRequests();
return pendingNotificationRequests;
}
它将返回带有 id、标题、正文和有效负载的待处理通知列表
【讨论】: