4

I already have created a flutter android application and works fine. I am using google_maps_flutter plugin to display the map with markers. After when trying to run my app to ios, i encountered a strange problem. It runs as i expected but the bottom right navigation toolbar is not displayed as on android device. I have seen how to disable it only from this question :

Flutter Google Maps remove navigation button at bottomRight on marker tap

Marker(
       markerId: MarkerId('firstMarker'),
       draggable: false,
       icon: BitmapDescriptor.fromBytes(_markerIcon),
       infoWindow: InfoWindow(
          title: f.name,
          snippet: f.time,
          onTap: (){
          displayInfo(f, context);
          }
     ),
     position: LatLng(f.lat, f.lon));

Is this caused from flutter or i must do some changes on my source code?

Michail Geek
  • 81
  • 1
  • 5

1 Answers1

1

For Android you need to add mapToolbarEnabled: true as a property of the GoogleMap widget.

Example:

GoogleMap(
  mapToolbarEnabled: true,
  buildingsEnabled: true,
  mapType: MapType.normal,
  onMapCreated: (controller) {
    _initMap(controller);
  },
);
sean.boyer
  • 1,187
  • 16
  • 24
  • 2
    /// True if the map should show a toolbar when you interact with the map. **Android only**. final bool mapToolbarEnabled; I still have a problem. Navigation button not showing on iOS. – Maks K. Maks Sep 04 '20 at 14:17