parseNotifications method

List<InboxNotification>? parseNotifications(
  1. DocumentSnapshot<Map<String, dynamic>> snapshot
)

Parses the notifications from the snapshot.

Implementation

List<InboxNotification>? parseNotifications(DocumentSnapshot<Map<String, dynamic>> snapshot) {
  final List notifications = snapshot.data()?['notifications'] as List;

  return notifications.map(
        (notification) => InboxNotification.fromMap(
          notification as Map,
        ),
      )
      .toList();
}