ConnectionState.fromJson constructor
a ConnectionState return type can be :
Implementation
factory ConnectionState.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case ConnectionStateWaitingForNetwork.CONSTRUCTOR:
return ConnectionStateWaitingForNetwork.fromJson(json);
case ConnectionStateConnectingToProxy.CONSTRUCTOR:
return ConnectionStateConnectingToProxy.fromJson(json);
case ConnectionStateConnecting.CONSTRUCTOR:
return ConnectionStateConnecting.fromJson(json);
case ConnectionStateUpdating.CONSTRUCTOR:
return ConnectionStateUpdating.fromJson(json);
case ConnectionStateReady.CONSTRUCTOR:
return ConnectionStateReady.fromJson(json);
default:
return const ConnectionState();
}
}