Place.fromJSON constructor

Place.fromJSON(
  1. dynamic place,
  2. Geocoding geocode
)

Implementation

Place.fromJSON(place, Geocoding geocode) {
  try {
    this.description = place["description"];
    this.placeId = place["place_id"];
    this.types = place["types"];

    this._geocode = geocode;
    this.fullJSON = place;
  } catch (e) {
    print("The argument you passed for Place is not compatible.");
  }
}