flutter_google_places
flutter_google_places copied to clipboard
Limit query results to Basic Data
Is it possible to limit query results to Basic Data only?
https://woolpert-googlecloud.github.io/maps-platform-best-practices/docs/place-details-fields
Thanks.
Hello, yes you can limit your received data while you are getting place details.
PlacesDetailsResponse detail = await places.getDetailsByPlaceId(p.placeId!, filelds: [ 'name', 'place_id', 'formatted_address' ] );
You can add as much as fields you want in List<String> format. Note: I wrote as I remember, there could be little differences. You can check while typing code. You need to find 'fields' field.
Basic | address_component, adr_address, alt_id, formatted_address, geometry (location), icon, id, name, permanently_closed, photo, place_id, plus_code, scope, type, url, utc_offset, vicinity
Contact | formatted_phone_number, international_phone_number, opening_hours, website
Atmosphere | price_level, rating, review, user_ratings_total
Regards!