create static method

TargetChat create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "targetChat",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "targetChat",
  5. TargetChatCurrent? target_chat_current,
  6. TargetChatChosen? target_chat_chosen,
  7. TargetChatInternalLink? target_chat_internal_link,
})
override

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

Implementation

static TargetChat create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "targetChat",
  bool special_is_json_scheme_class = true,
  String special_return_type = "targetChat",
  TargetChatCurrent? target_chat_current,
  TargetChatChosen? target_chat_chosen,
  TargetChatInternalLink? target_chat_internal_link,
}) {
  // TargetChat targetChat = TargetChat({
  final Map targetChat_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "target_chat_current": (target_chat_current != null) ? target_chat_current.toJson() : null,
    "target_chat_chosen": (target_chat_chosen != null) ? target_chat_chosen.toJson() : null,
    "target_chat_internal_link": (target_chat_internal_link != null) ? target_chat_internal_link.toJson() : null,
  };

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

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