create static method

ChatLocation create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatLocation",
  3. String special_return_type = "chatLocation",
  4. Location? location,
  5. String? address,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static ChatLocation create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatLocation",
  String special_return_type = "chatLocation",
  Location? location,
  String? address,
}) {
  // ChatLocation chatLocation = ChatLocation({
  final Map chatLocation_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "location": (location != null) ? location.toJson() : null,
    "address": address,
  };

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

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