How to use gestures on FlutterMap (flutter_map package) inside Column (or any scrollable View)?

473

Now with "flutter_map 0.14.0" it's finally fixed and works out of the box.

Share:
473
Jakob Kühne
Author by

Jakob Kühne

Updated on December 15, 2022

Comments

  • Jakob Kühne
    Jakob Kühne over 1 year

    I have the problem that I have a map inside a scrollable column. As map I use FlutterMap (flutter_map package). This is leaflet for flutter. In Google Maps there is a solution for exactly the problem by using "gestureRecognizers". The solution of the same problem with the Google Map packet: Google map in Flutter not responding to touch events .

    But how does this work with flutter_map? Or maybe there is a general solution for all kinds of widgets which need their own scroll gestures within a scrollable list or tabs?

    I have that problem on more than one place inside my code. One special place is for example:

    Scaffold -> Form -> TabBarView -> ListView -> Column -> Container -> FlutterMap
    

    So the page is scrollable down (ListView) and to the right (TabBarView). So the Map is nearly not useable (feels like static but shouldn't be static). It's a long form which is splitted over several tabs and at one place the user should choose a location.

    Many thanks and kind regards, Jakob