fromMap static method

GroupCallParticipant? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static GroupCallParticipant? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var participant_id = MessageSender.fromMap(_map['participant_id'])!;
  var audio_source_id = _map['audio_source_id']! as int;
  var screen_sharing_audio_source_id =
      _map['screen_sharing_audio_source_id']! as int;
  var video_info = GroupCallParticipantVideoInfo.fromMap(_map['video_info']);
  var screen_sharing_video_info = GroupCallParticipantVideoInfo.fromMap(
      _map['screen_sharing_video_info']);
  var bio = _map['bio']! as String;
  var is_current_user = _map['is_current_user']! as bool;
  var is_speaking = _map['is_speaking']! as bool;
  var is_hand_raised = _map['is_hand_raised']! as bool;
  var can_be_muted_for_all_users =
      _map['can_be_muted_for_all_users']! as bool;
  var can_be_unmuted_for_all_users =
      _map['can_be_unmuted_for_all_users']! as bool;
  var can_be_muted_for_current_user =
      _map['can_be_muted_for_current_user']! as bool;
  var can_be_unmuted_for_current_user =
      _map['can_be_unmuted_for_current_user']! as bool;
  var is_muted_for_all_users = _map['is_muted_for_all_users']! as bool;
  var is_muted_for_current_user = _map['is_muted_for_current_user']! as bool;
  var can_unmute_self = _map['can_unmute_self']! as bool;
  var volume_level = _map['volume_level']! as int;
  var order = _map['order']! as String;
  return GroupCallParticipant(
    extra: extra,
    clientId: clientId,
    participant_id: participant_id,
    audio_source_id: audio_source_id,
    screen_sharing_audio_source_id: screen_sharing_audio_source_id,
    video_info: video_info,
    screen_sharing_video_info: screen_sharing_video_info,
    bio: bio,
    is_current_user: is_current_user,
    is_speaking: is_speaking,
    is_hand_raised: is_hand_raised,
    can_be_muted_for_all_users: can_be_muted_for_all_users,
    can_be_unmuted_for_all_users: can_be_unmuted_for_all_users,
    can_be_muted_for_current_user: can_be_muted_for_current_user,
    can_be_unmuted_for_current_user: can_be_unmuted_for_current_user,
    is_muted_for_all_users: is_muted_for_all_users,
    is_muted_for_current_user: is_muted_for_current_user,
    can_unmute_self: can_unmute_self,
    volume_level: volume_level,
    order: order,
  );
}