Closed fikretsengul closed 4 months ago
extended_nested_scroll_view provides a fix for this (inner scrollables in tabview sync issue) Maybe we can extract the solution from this package or we can use extended_nested_scroll_view instead of original one to include other fixes too.
I was unable to replicate the issue you've mentioned. However, it appears that the key for your CustomScrollView
is being regenerated as a new UniqueKey
with each build: PageStorageKey<UniqueKey>(UniqueKey())
. This could potentially be the root cause of the problem you're facing. I recommend consulting the official sample code here: https://github.com/idootop/nested_scroll_view_plus/blob/b9f9c553f24eab76666b66c3b25e45114190f74a/example/lib/main.dart#L64
It's essential to assign a consistent unique key to each scrollView under the tab view, instead of generating a new UniqueKey()
for every build.
same issue. and the sample code also has this problem https://github.com/idootop/nested_scroll_view_plus/blob/main/example/lib/main.dart
In fact, the problem is not exactly preserving the scroll positions, but rather not being able to preserve them separately. For example:
In this configuration (I don't want to make my sliverappbar scrollable too), scrolling one view also scrolls other view.
https://github.com/idootop/nested_scroll_view_plus/assets/22684086/8aec98d5-27a4-4bea-8936-4a8a823b9416
Any suggestion to handle this case?