bazrafkan / google_place

A new Flutter package for handle google place api
MIT License
84 stars 126 forks source link

Option to request only specific fields from API #17

Closed mikah22 closed 3 years ago

mikah22 commented 3 years ago

Is there a way to request fetching only certain fields instead of everything that Google Places API has to offer. The reason why this is important is that Google has different pricing options based on what fields you are requesting. For example, Store open hours, Ratings are part of paid API, and fields like name, GPS coordinates are part of Free API. Your assistance is highly appreciated.

Charly6596 commented 3 years ago

Assuming you're talking about Place Details, you can see here there's a fields parameter https://github.com/bazrafkan/google_place/blob/ad520e86d45f41852a38ec78a76d39856e0ba059/lib/src/details/details.dart#L39-L45 Its value should contain comma separated list of place data types to return as explained in the google maps documentation

Parameter names follows the google maps documentation so you can check it to know what each parameter is for