ProxyType.fromJson constructor
a ProxyType return type can be :
Implementation
factory ProxyType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case ProxyTypeSocks5.CONSTRUCTOR:
return ProxyTypeSocks5.fromJson(json);
case ProxyTypeHttp.CONSTRUCTOR:
return ProxyTypeHttp.fromJson(json);
case ProxyTypeMtproto.CONSTRUCTOR:
return ProxyTypeMtproto.fromJson(json);
default:
return const ProxyType();
}
}