create static method

ReportReason create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "reportReason",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "reportReason",
  5. ReportReasonSpam? report_reason_spam,
  6. ReportReasonViolence? report_reason_violence,
  7. ReportReasonPornography? report_reason_pornography,
  8. ReportReasonChildAbuse? report_reason_child_abuse,
  9. ReportReasonCopyright? report_reason_copyright,
  10. ReportReasonUnrelatedLocation? report_reason_unrelated_location,
  11. ReportReasonFake? report_reason_fake,
  12. ReportReasonIllegalDrugs? report_reason_illegal_drugs,
  13. ReportReasonPersonalDetails? report_reason_personal_details,
  14. ReportReasonCustom? report_reason_custom,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static ReportReason create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "reportReason",
  bool special_is_json_scheme_class = true,
  String special_return_type = "reportReason",
  ReportReasonSpam? report_reason_spam,
  ReportReasonViolence? report_reason_violence,
  ReportReasonPornography? report_reason_pornography,
  ReportReasonChildAbuse? report_reason_child_abuse,
  ReportReasonCopyright? report_reason_copyright,
  ReportReasonUnrelatedLocation? report_reason_unrelated_location,
  ReportReasonFake? report_reason_fake,
  ReportReasonIllegalDrugs? report_reason_illegal_drugs,
  ReportReasonPersonalDetails? report_reason_personal_details,
  ReportReasonCustom? report_reason_custom,
}) {
  // ReportReason reportReason = ReportReason({
  final Map reportReason_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "report_reason_spam": (report_reason_spam != null) ? report_reason_spam.toJson() : null,
    "report_reason_violence": (report_reason_violence != null) ? report_reason_violence.toJson() : null,
    "report_reason_pornography": (report_reason_pornography != null) ? report_reason_pornography.toJson() : null,
    "report_reason_child_abuse": (report_reason_child_abuse != null) ? report_reason_child_abuse.toJson() : null,
    "report_reason_copyright": (report_reason_copyright != null) ? report_reason_copyright.toJson() : null,
    "report_reason_unrelated_location": (report_reason_unrelated_location != null) ? report_reason_unrelated_location.toJson() : null,
    "report_reason_fake": (report_reason_fake != null) ? report_reason_fake.toJson() : null,
    "report_reason_illegal_drugs": (report_reason_illegal_drugs != null) ? report_reason_illegal_drugs.toJson() : null,
    "report_reason_personal_details": (report_reason_personal_details != null) ? report_reason_personal_details.toJson() : null,
    "report_reason_custom": (report_reason_custom != null) ? report_reason_custom.toJson() : null,
  };

  reportReason_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (reportReason_data_create_json.containsKey(key) == false) {
        reportReason_data_create_json[key] = value;
      }
    });
  }
  return ReportReason(reportReason_data_create_json);
}