Place class

A place from GooglePlaces.details, GooglePlaces.searchText or GooglePlaces.searchNearby.

Only the fields you asked for (see PlaceField) are set; the rest are null or empty.

Annotations

Constructors

Place({required String id, String? name, String? formattedAddress, String? shortAddress, String? adrFormatAddress, PostalAddress? postalAddress, List<AddressComponent> addressComponents = const [], AddressDescriptor? addressDescriptor, Coordinates? location, Viewport? viewport, PlusCode? plusCode, List<String> types = const [], String? primaryType, String? primaryTypeLabel, String? googleMapsTypeLabel, String? iconMaskBaseUri, String? iconBackgroundColor, BusinessStatus? businessStatus, bool? pureServiceAreaBusiness, String? googleMapsUri, GoogleMapsLinks? googleMapsLinks, String? phoneNumber, String? internationalPhoneNumber, String? websiteUri, double? rating, int? userRatingCount, PriceLevel? priceLevel, PriceRange? priceRange, OpeningHours? openingHours, OpeningHours? currentOpeningHours, List<OpeningHours> secondaryOpeningHours = const [], List<OpeningHours> currentSecondaryOpeningHours = const [], int? utcOffsetMinutes, String? timeZone, String? editorialSummary, AiSummary? generativeSummary, AiSummary? reviewSummary, List<PlacePhoto> photos = const [], List<PlaceReview> reviews = const [], PlaceAmenities amenities = const PlaceAmenities(), AccessibilityOptions? accessibility, ParkingOptions? parking, PaymentOptions? payment, FuelOptions? fuelOptions, EvChargeOptions? evChargeOptions, List<NavigationPoint> navigationPoints = const [], List<String> containingPlaceIds = const [], List<String> subDestinationIds = const [], Map<String, Object?> json = const {}})
Creates a place.
const
Place.fromJson(Map<String, Object?> json)
Reads a place from the Places API.
factory

Properties

accessibility → AccessibilityOptions?
Wheelchair access.
final
addressComponents → List<AddressComponent>
The address split into parts. Use AddressParts for the city, state, postal code and country.
final
addressDescriptor → AddressDescriptor?
Nearby landmarks and the areas the place is in, such as "across the road from Sassoon Dock".
final
adrFormatAddress → String?
The address in adr microformat (HTML with <span class="...">).
final
amenities → PlaceAmenities
What the place offers, such as delivery or vegetarian food.
final
businessStatus → BusinessStatus?
Whether it is open for business at all.
final
containingPlaceIds → List<String>
The IDs of places this place is in, such as the mall a shop is in.
final
currentOpeningHours → OpeningHours?
The opening hours for the coming week, including holidays.
final
currentSecondaryOpeningHours → List<OpeningHours>
secondaryOpeningHours for the coming week, including holidays.
final
editorialSummary → String?
A short description from Google.
final
evChargeOptions → EvChargeOptions?
Chargers, for EV charging stations.
final
formattedAddress → String?
The full address.
final
fuelOptions → FuelOptions?
Fuel prices, for petrol pumps.
final
generativeSummary → AiSummary?
An AI-generated overview of the place.
final
Links to directions, reviews, photos and writing a review in Google Maps.
final
googleMapsTypeLabel → String?
The type label Google Maps shows, such as "Pizza Restaurant".
final
googleMapsUri → String?
A link that opens the place in Google Maps.
final
hashCode → int
The hash code for this object.
no setterinherited
iconBackgroundColor → String?
The icon's background color, such as "#FF9E67".
final
iconMaskBaseUri → String?
The base URL of the place's icon. Add .svg or .png.
final
id → String
The place ID. Store it to get the place again later.
final
internationalPhoneNumber → String?
The phone number in international format, such as "+91 22 ...".
final
json → Map<String, Object?>
The raw JSON, for fields this class doesn't cover.
final
location → Coordinates?
Where the place is.
final
name → String?
The name, such as "Gateway Of India Mumbai".
final
Where to stop when driving or walking to the place, such as an entrance on a side road.
final
openingHours → OpeningHours?
The usual weekly opening hours.
final
openNow → bool?
Whether it is open right now, if Google knows.
no setter
parking → ParkingOptions?
Parking.
final
payment → PaymentOptions?
Accepted payment methods.
final
phoneNumber → String?
The phone number in local format.
final
photos → List<PlacePhoto>
Photos. Show them with GooglePlaces.photoUrl.
final
plusCode → PlusCode?
The plus code.
final
postalAddress → PostalAddress?
The address in the standard postal format.
final
priceLevel → PriceLevel?
How expensive it is.
final
priceRange → PriceRange?
The usual price range, such as ₹200–400.
final
primaryType → String?
The main type, such as pizza_restaurant.
final
primaryTypeLabel → String?
The main type in words, such as "Pizza restaurant", in the request's language.
final
pureServiceAreaBusiness → bool?
True for businesses that only visit customers, such as plumbers, and have no shop to go to.
final
rating → double?
The average rating, 1 to 5.
final
reviews → List<PlaceReview>
Up to five reviews.
final
reviewSummary → AiSummary?
An AI-generated summary of the reviews.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secondaryOpeningHours → List<OpeningHours>
Hours of parts of the place, such as the drive-through or delivery. See OpeningHours.type.
final
shortAddress → String?
A shorter address, without the country and postal code.
final
subDestinationIds → List<String>
The IDs of places inside this place, such as an airport's terminals.
final
timeZone → String?
The IANA time zone, such as "Asia/Calcutta".
final
types → List<String>
All types, such as restaurant and food.
final
userRatingCount → int?
How many ratings rating is based on.
final
utcOffsetMinutes → int?
The place's time zone offset from UTC, in minutes.
final
viewport → Viewport?
The area to show on a map.
final
websiteUri → String?
The place's website.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited