ReportReason.fromJson constructor
a ReportReason return type can be :
Implementation
factory ReportReason.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case ReportReasonSpam.CONSTRUCTOR:
return ReportReasonSpam.fromJson(json);
case ReportReasonViolence.CONSTRUCTOR:
return ReportReasonViolence.fromJson(json);
case ReportReasonPornography.CONSTRUCTOR:
return ReportReasonPornography.fromJson(json);
case ReportReasonChildAbuse.CONSTRUCTOR:
return ReportReasonChildAbuse.fromJson(json);
case ReportReasonCopyright.CONSTRUCTOR:
return ReportReasonCopyright.fromJson(json);
case ReportReasonUnrelatedLocation.CONSTRUCTOR:
return ReportReasonUnrelatedLocation.fromJson(json);
case ReportReasonFake.CONSTRUCTOR:
return ReportReasonFake.fromJson(json);
case ReportReasonIllegalDrugs.CONSTRUCTOR:
return ReportReasonIllegalDrugs.fromJson(json);
case ReportReasonPersonalDetails.CONSTRUCTOR:
return ReportReasonPersonalDetails.fromJson(json);
case ReportReasonCustom.CONSTRUCTOR:
return ReportReasonCustom.fromJson(json);
default:
return const ReportReason();
}
}