toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final city = this.city;
  final country = this.country;
  final latitude = this.latitude;
  final longitude = this.longitude;
  final postalCode = this.postalCode;
  final region = this.region;
  return {
    if (city != null) 'City': city,
    if (country != null) 'Country': country,
    if (latitude != null) 'Latitude': latitude,
    if (longitude != null) 'Longitude': longitude,
    if (postalCode != null) 'PostalCode': postalCode,
    if (region != null) 'Region': region,
  };
}