PageView(
scrollDirection: Axis.horizontal,
children: [
StatefulPageview( //Displays vertical pageview
articles: state.articles,
currentPage: currentStare);
ArticleWebView( //Displays webview
url: 'www.google.com',
);
],
);
Here I have nested Pageview. Outer one that scrolls horizontally and an inner one that scrolls vertically. The inner pageview works fine but when I swipe right and on the WebView that has to scroll vertically as well, even the slightest horizontal movement scrolls back to the inner Pageview.So i can not basically scroll smoothly inside webview widget. I even tried creating custom scroll physics to make it work like this.
class StickyPageViewScrollPhysics extends PageScrollPhysics {
const StickyPageViewScrollPhysics({ScrollPhysics? parent})
: super(parent: parent);
@override
StickyPageViewScrollPhysics applyTo(ScrollPhysics? ancestor) {
return StickyPageViewScrollPhysics(parent: buildParent(ancestor)!);
}
@override
SpringDescription get spring => const SpringDescription(
mass: 100,
stiffness: 1000,
damping: 10.0,
);
}
But it does not seem to work. Does anyone have an idea how can I solve this ?