Search code examples
fluttergoogle-mapsscrollsinglechildscrollview

GoogleMap card in Column in SingleChildScrollView


I am using the GoogleMap Widget from the google_maps_flutter package. I have placed the GoogleMap widget in SizedBox with width and height of 300 in a Column with other children. I have placed the Column in a SingleChildScrollView because there are many children. When the Column doesn't use the SingleChildScrollView, there is no problem. But when there are enough children so that scrolling is necessary, the GoogleMap widget becomes impossible to zoom in or pan (move the viewport) with gestures.


Solution

  • Google map in Flutter not responding to touch events

    Solution snippet:

    gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
              Factory<OneSequenceGestureRecognizer>(
                () => EagerGestureRecognizer(),
              ),
            },