Search code examples
fluttergoogle-mapscameracentermarker

Google Maps Flutter disable center Marker after onTap()


I use flutter_google_maps and after tapping on a Marker the Marker is centered automatically on the map. Is there a way to disable this?

Thanks Joerg


Solution

  • At the time of creating the marker make sure you are passing consumeTapEvents to true, and it will do the magic. Follow the below line of code:

    Marker marker = Marker(markerId: markerId, consumeTapEvents: true)