In this recipe, you will add Google Maps to your app, and the requisite steps to integrate it in your iOS or Android project:
- Create a new Flutter app, and call it map_recipe.
- Add the Google Maps package dependency to the project's pubspec.yaml file. The name of the package is google_maps_flutter:
dependencies:
google_maps_flutter: ^2.0.3
- In order to use Google Maps, you need to obtain an API key. You can get one from the Google Cloud Platform (GCP) console at the following link: https://cloud.google.com/maps-platform/.
- Once you enter the console with a Google account, you should see a screen similar to the one shown here:
- Every API key belongs to a project. Create a new project called maps-recipe, leaving No Organization for your location, and then click the Create button.
- On the credentials page, you can create new credentials. Click on the Create credentials button and choose Api Key. You will generally want to restrict the use of your keys,...