CallState.fromJson constructor
a CallState return type can be :
Implementation
factory CallState.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case CallStatePending.CONSTRUCTOR:
return CallStatePending.fromJson(json);
case CallStateExchangingKeys.CONSTRUCTOR:
return CallStateExchangingKeys.fromJson(json);
case CallStateReady.CONSTRUCTOR:
return CallStateReady.fromJson(json);
case CallStateHangingUp.CONSTRUCTOR:
return CallStateHangingUp.fromJson(json);
case CallStateDiscarded.CONSTRUCTOR:
return CallStateDiscarded.fromJson(json);
case CallStateError.CONSTRUCTOR:
return CallStateError.fromJson(json);
default:
return const CallState();
}
}