CallDiscardReason.fromJson constructor

CallDiscardReason.fromJson(
  1. Map<String, dynamic> json
)

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();
  }
}