Home > Mobile >  Screen scroll not starting from beginning - Flutter
Screen scroll not starting from beginning - Flutter

Time:07-14

I am helping contribute a code and am stuck on a scrolling bug in flutter. The screen when opened is started from the Google Maps widget like this

But when I hold the screen and scroll above then the top content is displayed like this

Now, I cannot interact with the top content since when I release the scroll hold it bounces back to start at the map. I hope I made senseI cant attach a video here to describe it more accurately. Here is the link for the respective file associated with the screen,you can download it to check out the code:

The mobile app UI code starts from line 876. Any help would be appreciated.

CodePudding user response:

I haven't executed your code because it depends on lot of your other files but from reading your code I think the problem is occurring because of extendBodyBehindAppBar of Scaffold. (Checkout line number 114 in given file). Removing this argument or setting it to false should solve the problem.

From the docs :

If true, and an appBar is specified, then the height of the body is extended to include the height of the app bar and the top of the body is aligned with the top of the app bar.

This is useful if the app bar's AppBar.backgroundColor is not completely opaque.

This property is false by default. It must not be null.

  • Related