-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I was using the NestedScrollView widget in my flutter application and was following the example present in the widget documentation here.
Following the example, I wrapped my SliverAppBar in a SliverOverlapAbsorber and used a SliverOverlapInjector in my inner scrollview to align it with the bottom of the SliverAppBar
Even though this has the desired effect of aligning the scrollview with the app bar, it has the following issues:
- The
GlowingOverscrollIndicatoris hidden by the sliver app bar when you are scrolling upwards - The
RefreshIndicatoris not visible if the inner scroll view is wrapped in one.
The fix to all of these issues, to my surprise, was simply to completely remove the overlap absorber and injectors. The scrollview was appropriately aligned and the overscroll indicators and refresh indicators are visible.
I think the documentation here is misleading as it seems to suggest that these absorbers and injectors are necessary in order to use the NestedScrollView correctly, and it does not indicate the exact scenario when these special widgets are required (if they are required at all anymore).
Maybe the documentation should be updated to contain a simpler example that targets the simplest most common use case (that is, a scrolling app bar shared across multiple tabs / pages).