fromMap static method

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

Construct from Map.

Implementation

static JoinGroupCall? 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 group_call_id = _map['group_call_id']! as int;
  var participant_id = MessageSender.fromMap(_map['participant_id']);
  var audio_source_id = _map['audio_source_id']! as int;
  var payload = _map['payload']! as String;
  var is_muted = _map['is_muted']! as bool;
  var is_my_video_enabled = _map['is_my_video_enabled']! as bool;
  var invite_hash = _map['invite_hash']! as String;
  return JoinGroupCall(
    extra: extra,
    clientId: clientId,
    group_call_id: group_call_id,
    participant_id: participant_id,
    audio_source_id: audio_source_id,
    payload: payload,
    is_muted: is_muted,
    is_my_video_enabled: is_my_video_enabled,
    invite_hash: invite_hash,
  );
}