Adding markers to the map helps to enrich the contextual information involved in it; however, this is far from enough for a real map-based app. Handling events or changing the map according to user needs is also fundamental. Let's see how we can add markers dynamically to the map and use the GoogleMapController class to interact with the map camera programmatically.
Adding map interactions
Adding markers dynamically
As said before, we need to pass the markers during the GoogleMap widget construction, so the first step is to make our MapPage widget a StatefulWidget widget and rebuild its subtree every time we want to add a new marker.
After that, we need to add a button to the layout so that we can add the marker after...