pendingNotificationRequests method

  1. @override
Future<List<PendingNotificationRequest>> pendingNotificationRequests()
inherited

Returns a list of notifications pending to be delivered/shown

Implementation

@override
Future<List<PendingNotificationRequest>> pendingNotificationRequests() async {
  final List<Map<dynamic, dynamic>>? pendingNotifications =
      await _channel.invokeListMethod('pendingNotificationRequests');
  return pendingNotifications
          // ignore: always_specify_types
          ?.map((p) => PendingNotificationRequest(
              p['id'], p['title'], p['body'], p['payload']))
          .toList() ??
      <PendingNotificationRequest>[];
}