onNotificationReceived property
Stream<NotificationPayload>
get
onNotificationReceived
Stream of received notifications from both Firebase and Local sources.
Implementation
Stream<NotificationPayload> get onNotificationReceived {
return StreamGroup.merge(<Stream<NotificationPayload>>[
_firebaseRepository.onNotificationReceived.map(
(NotificationPayload payload) => payload.copyWith(
data: <String, dynamic>{...payload.data, 'source': 'firebase'},
),
),
_localRepository.onNotificationReceived.map(
(NotificationPayload payload) => payload.copyWith(
data: <String, dynamic>{...payload.data, 'source': 'local'},
),
),
]);
}