The awesome_place_search package is a Flutter library that provides a user interface for searching places using the Google Places API. With this package, you can easily implement a location search bar that shows suggestions as the user types.
Added support for Google API headers in HTTP requests using the google_api_headers package
Modified HttpClient to accept optional headers parameter
Integrated Google API headers in GetSearchRemoteDataSource for both place details and autocomplete endpoints
Why
When making requests to Google Maps APIs from Flutter applications, certain platform-specific headers are required for proper authentication and request tracking. The google_api_headers package automatically handles these requirements by providing the appropriate headers based on the platform (Android/iOS).
Testing
Verified that place search and details requests work correctly with the added headers
Confirmed compatibility with both Android and iOS platforms
Changes
google_api_headers
packageHttpClient
to accept optional headers parameterGetSearchRemoteDataSource
for both place details and autocomplete endpointsWhy
When making requests to Google Maps APIs from Flutter applications, certain platform-specific headers are required for proper authentication and request tracking. The
google_api_headers
package automatically handles these requirements by providing the appropriate headers based on the platform (Android/iOS).Testing
Dependencies Added