fromMap static method

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

Construct from Map.

Implementation

static TestProxy? 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 server = _map['server']! as String;
  var port = _map['port']! as int;
  var type = ProxyType.fromMap(_map['type'])!;
  var dc_id = _map['dc_id']! as int;
  var timeout = _map['timeout']! as double;
  return TestProxy(
    extra: extra,
    clientId: clientId,
    server: server,
    port: port,
    type: type,
    dc_id: dc_id,
    timeout: timeout,
  );
}