ChatReportReason.fromJson constructor
a ChatReportReason return type can be :
Implementation
factory ChatReportReason.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case ChatReportReasonSpam.CONSTRUCTOR:
return ChatReportReasonSpam.fromJson(json);
case ChatReportReasonViolence.CONSTRUCTOR:
return ChatReportReasonViolence.fromJson(json);
case ChatReportReasonPornography.CONSTRUCTOR:
return ChatReportReasonPornography.fromJson(json);
case ChatReportReasonChildAbuse.CONSTRUCTOR:
return ChatReportReasonChildAbuse.fromJson(json);
case ChatReportReasonCopyright.CONSTRUCTOR:
return ChatReportReasonCopyright.fromJson(json);
case ChatReportReasonUnrelatedLocation.CONSTRUCTOR:
return ChatReportReasonUnrelatedLocation.fromJson(json);
case ChatReportReasonFake.CONSTRUCTOR:
return ChatReportReasonFake.fromJson(json);
case ChatReportReasonCustom.CONSTRUCTOR:
return ChatReportReasonCustom.fromJson(json);
default:
return const ChatReportReason();
}
}