Result.fromJson constructor

Result.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Result.fromJson(Map<String, dynamic> json) => Result(
      addressComponents: json["address_components"] == null
          ? []
          : List<AddressComponent>.from(json["address_components"]!
              .map((x) => AddressComponent.fromJson(x))),
      adrAddress: json["adr_address"],
      businessStatus: json["business_status"],
      formattedAddress: json["formatted_address"],
      formattedPhoneNumber: json["formatted_phone_number"],
      geometry: json["geometry"] == null
          ? null
          : Geometry.fromJson(json["geometry"]),
      icon: json["icon"],
      iconBackgroundColor: json["icon_background_color"],
      iconMaskBaseUri: json["icon_mask_base_uri"],
      internationalPhoneNumber: json["international_phone_number"],
      name: json["name"],
      photos: json["photos"] == null
          ? []
          : List<Photo>.from(json["photos"]!.map((x) => Photo.fromJson(x))),
      placeId: json["place_id"],
      plusCode: json["plus_code"] == null
          ? null
          : PlusCode.fromJson(json["plus_code"]),
      rating: json["rating"]?.toDouble(),
      reference: json["reference"],
      reviews: json["reviews"] == null
          ? []
          : List<Review>.from(
              json["reviews"]!.map((x) => Review.fromJson(x))),
      types: json["types"] == null
          ? []
          : List<String>.from(json["types"]!.map((x) => x)),
      url: json["url"],
      userRatingsTotal: json["user_ratings_total"],
      utcOffset: json["utc_offset"],
      vicinity: json["vicinity"],
      website: json["website"],
      wheelchairAccessibleEntrance: json["wheelchair_accessible_entrance"],
    );