Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
CustomScrollView + SliverAppBar + WebView #31243
When trying to implement a floating
As seen on this GIF:
Yup that's exactly what's happening.
partial solution in my repo
I will share my view here repeating what I wrote in my answer in stackoverflow may be it can help providing a solution
I can give you my view for why it is not possible to do that with the current state of the plugin ,by default the Webview only respond to drag gesture when no other views claim that gesture. On the other hand, Scrolling slivers like SliverList, which is needed to make the SliverAppBar to scroll up ,by default consumes all drag scrolling gestures -although you can disable that by providing noScrollPhysics - but once the WebView cover all the screen there is actually noway to report back to the slivers to start consume scroll again .
So the solution is to modify the WebView plugin itself to provide a callback
I already did that just for a proof of concept you can check my repo Plugins by adding a new callback to the webView
just to make it clear it works only for android api M or above right now
the same issue.
To anyone following this issue, I'm getting into this, and will try to add some more information in a near future (hopefully, if I could understand it).
Gesture arena of a valid use case
Gesture arena of a invalid use case (partial HTML, then cut or infinite height)
Scroll on SliverAppBar area from a screen with Webview using a
Scroll on the webview area from a screen with Webview using a
Scroll wherever in the screen (SliverAppBar or body) from a screen with SliverGrid
Next things to investigate for me
Please advise if it is not the right approach.
By the way, I've had NestedScrollView + SliverAppBar + WebView previously, and I recently moved to CustomScrollView + SliverAppBar + WebView because it would crash in release builds only.
Please see #30247 (comment) for more information