-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for adding Sliver into an IndexedStack #82
Comments
I'm not planning on adding new features myself in the nearby future. But I do have a draft PR open which does something similar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, firstly - thanks for such a fantastic, easy to use sliver package. I use this extensively and its really allowed me to create with ease sliver related functionality.
I'm now finding however a limitation - maybe you can provide a potential workaround. I have a Tab where I have 3 tabviews, the contents of each tabview is a Sliver. Prior to placing each tabview in a sliver, I used an IndexedStack which basically promoted the currently active tabs data, thus making it current and displaying the List. This works perfectly ... however, once I switched to using a SliverList for each of the 3 tabviews, I found that the IndexedStack did not permit a SliverList to be a direct child.
I therefore tried to provide a workaround , such as :
As you can see, I add all three list views on top of each other and only show the data for the active tab. That works perfectly. The issue I have however is that even though we only show 1 active SliverList at a time, the hidden SliverLists appear to still receive events (and thus rebuild) when we scroll the primary (active) SliverList.
I was playing around with using :
Offstage, Opacity, Visibility, Absorbing, Ignore etc widgets to try and prevent the hidden Widgets from receiving and rebuilding but since they are placed on a SliverStack (and no SliverIndexedStack) they still receive events and thus cause further issues.
So, to conclude - is there any plans for a SliverIndexStack or do you know of any way to accomplish the above ?
TIA.
The text was updated successfully, but these errors were encountered: