fromMap static method

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

Construct from Map.

Implementation

static DiscardCall? 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 call_id = _map['call_id']! as int;
  var is_disconnected = _map['is_disconnected']! as bool;
  var duration = _map['duration']! as int;
  var is_video = _map['is_video']! as bool;
  var connection_id = _map['connection_id']! as int64;
  return DiscardCall(
    extra: extra,
    clientId: clientId,
    call_id: call_id,
    is_disconnected: is_disconnected,
    duration: duration,
    is_video: is_video,
    connection_id: connection_id,
  );
}