onParticipantLeft method

Stream<Event<NotificationServiceEventNames, ParticipantLeftNotificationData>> onParticipantLeft()

Returns a Stream of the NotificationServiceEventNames.participantLeft events. By subscribing to the returned stream you will be notified when participants leave the conference.

Implementation

Stream<Event<NotificationServiceEventNames, ParticipantLeftNotificationData>>
    onParticipantLeft() {
  return _eventStream.addListener(
      [NotificationServiceEventNames.participantLeft.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, ParticipantLeftNotificationMapper.fromMap(data));
  });
}