create static method

ReportChat create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "reportChat",
  3. String special_return_type = "reportChatResult",
  4. bool? is_tdlib_method,
  5. num? chat_id,
  6. String? option_id,
  7. List<num>? message_ids,
  8. String? text,
})
override

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

Implementation

static ReportChat create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "reportChat",
  String special_return_type = "reportChatResult",
  bool? is_tdlib_method,
  num? chat_id,
  String? option_id,
  List<num>? message_ids,
  String? text,
}) {
  // ReportChat reportChat = ReportChat({
  final Map reportChat_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "chat_id": chat_id,
    "option_id": option_id,
    "message_ids": message_ids,
    "text": text,
  };

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

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