parseNotifications method
- DocumentSnapshot<
Map< snapshotString, dynamic> >
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();
}