September 2019
Beginner
512 pages
12h 52m
English
First of all, we need to add the plugin as a dependency in our project's pubspec.yaml file and get it with the flutter packages get command:
dependencies: google_maps_webservice: ^0.0.12
After that, we can start using the plugin. The first thing we need to do is create a GoogleMapsPlaces class instance so that we have access to the provided methods:
@override void initState() { super.initState(); _googleMapsPlaces = GoogleMapsPlaces( apiKey: 'API_KEY', ); }
We do this in the initState method so that we can use it right after the map is displayed to the user. _googleMapsPlaces is a field inside the state of the MapPage widget.
Then, we define a method that will query a place ...
Read now
Unlock full access