1

I'm using google_maps_flutter(https://pub.dev/packages/google_maps_flutter) package.

Widget structure is Scaffold > Stack > GoogleMap

The problem is that Markers' onTap events works fine but Polygons' onTap events don't fire at all.

Why is this?

Whezer
  • 101
  • 1
  • 7
  • Could you please provide a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) so we could take a look at the issue? – Nelson Jr. Aug 19 '21 at 01:02
  • Showing the code it matters a lot so as you can easily be helped. – 4xMafole Mar 19 '22 at 19:15

2 Answers2

4

Make consumeTapEvents: true, which is an attribute of Polygon.

Muktadir Sony
  • 344
  • 4
  • 9
0

I had the same problem and setting an empty onTap method for the GoogleMap object made it work

GoogleMap(
   ... 
   onTap: (x) {},
)
Cesarell0
  • 1
  • 2