'How to find out if a notification is scheduled?

Using flutter_local_notifications I create a scheduled notification like this:

final tz.TZDateTime nextInstance = calcNextInstanceOfDayOfWeekAndTime(dayOfWeek, hour, minute);
await _flutterLocalNotificationsPlugin.zonedSchedule(
  notificationId,
  title,
  body,
  nextInstance,
  matchDateTimeComponents: DateTimeComponents.dayOfWeekAndTime,
  uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime,
  // ... payload and other details
);

Some days later I want to check if notificationId is scheduled or not.

Or more generally speaking: I wonder how to get a list of the currently scheduled notifications.

If this is not possible with flutter_local_notifications is that possible with awesome_notifications? I could not find any information in the readmes of the packages regarding this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source