flutter GestureDetector with the flutter map or mapbox

664 views Asked by At

I am new in the flutter and my problem is when the GestureDetector child is a flutter map a OnTapUp method not response but when the child is a container every things work fine. How to get response from OnTapUp when GestureDetector child is a flutter map?

3

There are 3 answers

1
Abhishek kumar On

maybe you could use a stack and create button over it with transparent background.

0
jartos On

For FlutterMap options you can find for example onTap method.

FlutterMap( mapController: _mapController, options: MapOptions( onTap: (tapPosition, point) {}),)

You don't need to use GestureDetector.

1
Joran On

You can only add one event listener to a single event.

The mapbox widget (and any other map widget) will take the OnTapUp event, so you cannot listen to it a second time.