fromMap static method

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

Construct from Map.

Implementation

static VideoChat? 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 has_participants = _map['has_participants']! as bool;
  var default_participant_id =
      MessageSender.fromMap(_map['default_participant_id']);
  return VideoChat(
    extra: extra,
    clientId: clientId,
    group_call_id: group_call_id,
    has_participants: has_participants,
    default_participant_id: default_participant_id,
  );
}