create static method

Location create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "location",
  3. String special_return_type = "location",
  4. double? latitude,
  5. double? longitude,
  6. double? horizontal_accuracy,
})
override

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

Implementation

static Location create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "location",
  String special_return_type = "location",
  double? latitude,
  double? longitude,
  double? horizontal_accuracy,
}) {
  // Location location = Location({
  final Map location_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "latitude": latitude,
    "longitude": longitude,
    "horizontal_accuracy": horizontal_accuracy,
  };

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

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