有没有办法获取已注册的预订通知的列表?
我想知道 Flutter 本地通知时间表的数量和通知 ID 列表。
答案 0 :(得分:0)
在你的本地通知类中添加这个函数,你可以从外部用一个对象调用它
returnPendingNotifications() async {
final List<PendingNotificationRequest> pendingNotificationRequests =
await flutterLocalNotificationsPlugin.pendingNotificationRequests();
return pendingNotificationRequests;
}
它将返回带有 id、标题、正文和有效负载的待处理通知列表