I think it may depend on what you need to do with that Gesture Detector..
I was having a similar problem using a GestureDetector to open/close a menu drawer.
So my solution was to create a control
variable to check if the Menu was opened or closed and then set null
the event callbacks of the GestureDetector widget, something like this:
GestureDetector(
behavior: HitTestBehavior.translucent,
onVerticalDragStart: isDraggable ? _doVerticalDrag : null,
onHorizontalDragStart: isDraggable ? _doHorizontalDrag : null,
child: GoogleMap(),
);
So when isDraggable
is false
the map will receive the drag actions.
Hope this helps to someone else having a similar problem.