Flutter: Find places, get directions and work with Google Maps.
Everyone who has worked with flutter google maps have thought in work with addresses, find places using coordinates or street references and get directions to draw polylines in the map. Well, do it is easy peasy lemon squeezy now!
Lets see an example:
The only requirement to use this plugin is a google key which can call to Google Places, Directions and Geocoding APIs.
A simple implementation to search an address could be the next:
However, you can create your own address search widget using the builder:
And the most important..! to get directions you just need to use RouteSearchBox widget like in the next example:
Don’t be afraid, it’s not a lot of code, just indentation :)
What WaypointsManager does? it’s an object which includes the list of address of the waypoints and a ValueNotifier to create an updateble widget that reacts when an address changes in the list.
I really don’t have more to say, i actually hope those examples help you to implement this plugin and give you a better and easier codding!