简体   繁体   English

Flutter 本地通知计划的数量和通知 ID 列表

[英]number of flutter local notification schedule and a list of notification IDs

Is there a way to get a list of how many reservation notifications have been registered?有没有办法获取已注册的预订通知的列表?

I want to know the number of flutter local notification schedule and a list of notification IDs.我想知道颤振本地通知计划的数量和通知 ID 列表。

Add this function inside your local notification class and you can call it from outside with an object在本地通知类中添加此函数,您可以从外部使用对象调用它

returnPendingNotifications() async {
    final List<PendingNotificationRequest> pendingNotificationRequests =
        await flutterLocalNotificationsPlugin.pendingNotificationRequests();
    return pendingNotificationRequests;
  }

It'll return a list of pending notifications with id, title, body and payload它将返回带有 id、标题、正文和有效负载的待处理通知列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM