markAllNotificationsAsRead method

  1. @override
Future<List<Notification>> markAllNotificationsAsRead()
override

Marks all notifications as read for the currently logged in user.

Implementation

@override
Future<List<Notification>> markAllNotificationsAsRead() async {
  final notifications = await getNotifications();

  return Future.wait(notifications.map((notification) async {
    if (notification.read) {
      return notification;
    }

    return await markNotificationAsRead(notification);
  }));
}