create static method

MessageLocation create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "messageLocation",
  3. String special_return_type = "messageContent",
  4. Location? location,
  5. num? live_period,
  6. num? expires_in,
  7. num? heading,
  8. num? proximity_alert_radius,
})
override

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

Implementation

static MessageLocation create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "messageLocation",
  String special_return_type = "messageContent",
  Location? location,
  num? live_period,
  num? expires_in,
  num? heading,
  num? proximity_alert_radius,
}) {
  // MessageLocation messageLocation = MessageLocation({
  final Map messageLocation_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "location": (location != null) ? location.toJson() : null,
    "live_period": live_period,
    "expires_in": expires_in,
    "heading": heading,
    "proximity_alert_radius": proximity_alert_radius,
  };

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

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