CallDiscardReason.fromJson constructor
a CallDiscardReason return type can be :
Implementation
factory CallDiscardReason.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case CallDiscardReasonEmpty.CONSTRUCTOR:
return CallDiscardReasonEmpty.fromJson(json);
case CallDiscardReasonMissed.CONSTRUCTOR:
return CallDiscardReasonMissed.fromJson(json);
case CallDiscardReasonDeclined.CONSTRUCTOR:
return CallDiscardReasonDeclined.fromJson(json);
case CallDiscardReasonDisconnected.CONSTRUCTOR:
return CallDiscardReasonDisconnected.fromJson(json);
case CallDiscardReasonHungUp.CONSTRUCTOR:
return CallDiscardReasonHungUp.fromJson(json);
default:
return const CallDiscardReason();
}
}