fromMap static method
override
Construct from Map.
Implementation
static GroupCall? 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 id = _map['id']! as int;
var title = _map['title']! as String;
var scheduled_start_date = _map['scheduled_start_date']! as int;
var enabled_start_notification =
_map['enabled_start_notification']! as bool;
var is_active = _map['is_active']! as bool;
var is_rtmp_stream = _map['is_rtmp_stream']! as bool;
var is_joined = _map['is_joined']! as bool;
var need_rejoin = _map['need_rejoin']! as bool;
var can_be_managed = _map['can_be_managed']! as bool;
var participant_count = _map['participant_count']! as int;
var has_hidden_listeners = _map['has_hidden_listeners']! as bool;
var loaded_all_participants = _map['loaded_all_participants']! as bool;
var recent_speakers = List<GroupCallRecentSpeaker>.from(
(_map["recent_speakers"] ?? []).map(
(e) => GroupCallRecentSpeaker.fromMap(e),
),
);
var is_my_video_enabled = _map['is_my_video_enabled']! as bool;
var is_my_video_paused = _map['is_my_video_paused']! as bool;
var can_enable_video = _map['can_enable_video']! as bool;
var mute_new_participants = _map['mute_new_participants']! as bool;
var can_toggle_mute_new_participants =
_map['can_toggle_mute_new_participants']! as bool;
var record_duration = _map['record_duration']! as int;
var is_video_recorded = _map['is_video_recorded']! as bool;
var duration = _map['duration']! as int;
return GroupCall(
extra: extra,
clientId: clientId,
id: id,
title: title,
scheduled_start_date: scheduled_start_date,
enabled_start_notification: enabled_start_notification,
is_active: is_active,
is_rtmp_stream: is_rtmp_stream,
is_joined: is_joined,
need_rejoin: need_rejoin,
can_be_managed: can_be_managed,
participant_count: participant_count,
has_hidden_listeners: has_hidden_listeners,
loaded_all_participants: loaded_all_participants,
recent_speakers: recent_speakers,
is_my_video_enabled: is_my_video_enabled,
is_my_video_paused: is_my_video_paused,
can_enable_video: can_enable_video,
mute_new_participants: mute_new_participants,
can_toggle_mute_new_participants: can_toggle_mute_new_participants,
record_duration: record_duration,
is_video_recorded: is_video_recorded,
duration: duration,
);
}