google_maps_api_flutter

Creator: coderz1093

Last updated:

0 purchases

google_maps_api_flutter Image
google_maps_api_flutter Images
Add to Cart

Description:

google maps api flutter

Flutter Google Maps API Package #
This package seamlessly integrates the Google Maps API into your Flutter application, offering type-safe requests and responses, complemented with versatile widgets.
Features #
API #
The package provides fully type-safe request and response handling for the following Google Maps API endpoints:


Places API:

Autocomplete
Details
Search (Upcoming)
Photos (Upcoming)



Geocoding:

Geocode (Upcoming)
Reverse Geocoding (Upcoming)



Routes:

Various functionalities (Upcoming)



Widgets #
In addition to API integration, this package offers customizable widgets leveraging these APIs, such as:

Place Autocomplete Widget

Getting Started #

Obtain an API key from Google Cloud Console.
Ensure the key is enabled for WEB Requests since the package uses HTTP requests to interact with the APIs.
Install the latest version of this package using:
flutter pub add google_maps_api
copied to clipboard


Usage #
Initialize the API with your key:
final googleMapsApi = GoogleMapsApi(apiKey: "YOUR_API_KEY");
copied to clipboard
Example usage for retrieving place details:
final googleMapsApi = GoogleMapsApi(apiKey: "YOUR_API_KEY");
PlacesDetailsResponse response = await googleMapsApi.places.details(
placeId: "ChIJN1t_tDeuEmsRUsoyG83frY4",
);

if (response.status == PlacesDetailsStatus.OK) {
print(response.place);
}
copied to clipboard
Widget example:
PlaceAutocomplete(
onSelected: (selection) {
setState(() {
_selection = selection;
});
},
apiKey: "YOUR_API_KEY",
),
copied to clipboard
For more examples, refer to the /example directory, which includes a comprehensive sample application.
Additional Information #
Contributing #
As the Google Maps API encompasses numerous endpoints, contributions are highly appreciated to expand and enhance this package.

If you find this package useful, please give it a like and star it on GitHub to support its popularity!

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.