toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.accuracyRadiusMeters != null) {
    json[r'accuracy_radius_meters'] = this.accuracyRadiusMeters;
  } else {
    json[r'accuracy_radius_meters'] = null;
  }
  if (this.city != null) {
    json[r'city'] = this.city;
  } else {
    json[r'city'] = null;
  }
  if (this.continent != null) {
    json[r'continent'] = this.continent;
  } else {
    json[r'continent'] = null;
  }
  if (this.country != null) {
    json[r'country'] = this.country;
  } else {
    json[r'country'] = null;
  }
  if (this.countryIsoCode != null) {
    json[r'country_iso_code'] = this.countryIsoCode;
  } else {
    json[r'country_iso_code'] = null;
  }
  if (this.latitude != null) {
    json[r'latitude'] = this.latitude;
  } else {
    json[r'latitude'] = null;
  }
  if (this.longitude != null) {
    json[r'longitude'] = this.longitude;
  } else {
    json[r'longitude'] = null;
  }
  if (this.subdivision != null) {
    json[r'subdivision'] = this.subdivision;
  } else {
    json[r'subdivision'] = null;
  }
  return json;
}