onInvitationReceived method

Stream<Event<NotificationServiceEventNames, InvitationReceivedNotificationData>> onInvitationReceived()

Returns a Stream of the NotificationServiceEventNames.invitationReceived events. By subscribing to the returned stream you will be notified about new conference invitations.

Implementation

Stream<
    Event<NotificationServiceEventNames,
        InvitationReceivedNotificationData>> onInvitationReceived() {
  return _eventStream.addListener(
      [NotificationServiceEventNames.invitationReceived.value]).map((map) {
    final event = map as Map<Object?, Object?>;
    final key = NotificationServiceEventNames.valueOf(event["key"] as String);
    final data = event["body"] as Map<Object?, Object?>;
    return Event(key, InvitationReceivedNotificationMapper.fromMap(data));
  });
}