Home > Software engineering >  flutter pull_to_refresh makes webview unscrollable
flutter pull_to_refresh makes webview unscrollable

Time:04-28

I have a webview inside ZoomDrawer and SmartRefresher and the webview becomes unscrollable as soon as i implemented SmartRefresher. and funny thing is, it works well in iOS but in Android, is not. I'm wondering if there's anybody having the same issue because i couldn't find simillar case online.
Below there's structure of my app

enter image description here

CodePudding user response:

I have not tried to reproduce the issue but in the question you have said that it is scrolling in the IOS while doesn't in Android, the thing that controls the scrolling behavior in Flutter is called scrollPhysics, which is by default set to:

BouncingScrollPhysics, which provides the bouncing overscroll behavior found on iOS. ClampingScrollPhysics, which provides the clamping overscroll behavior found on Android.

So try to set the scrollPhysics property to BouncingScrollPhysics to match the IOS behavior which might be a solution for the issue.

For a reference in scrollPhysics, check the See also section on top of the following page.

  • Related