Address.fromMap constructor

Address.fromMap(
  1. Map map
)

Creates an address from a map containing its properties.

Implementation

Address.fromMap(Map map)
    : coordinates = Coordinates.fromMap(map["coordinates"]),
      addressLine = map["addressLine"],
      countryName = map["countryName"],
      countryCode = map["countryCode"],
      featureName = map["featureName"],
      postalCode = map.containsKey("postalCode") ? map["postalCode"] : null,
      locality = map.containsKey("locality") ? map["locality"] : null,
      subLocality =
          map.containsKey("subLocality") ? map["subLocality"] : null,
      adminArea = map.containsKey("adminArea") ? map["adminArea"] : null,
      subAdminArea =
          map.containsKey("subAdminArea") ? map["subAdminArea"] : null,
      thoroughfare =
          map.containsKey("thoroughfare") ? map["thoroughfare"] : null,
      subThoroughfare =
          map.containsKey("subThoroughfare") ? map["subThoroughfare"] : null;