You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if there is any way to retrieve all elements from BackStack?
It can be useful in the following cases:
We want to render all screens from BackStack on top of each other, so after navigating back we will not re-render some screens.
Integration with compose-backstack (library for rendering animated transitions between backstacks of screens) would be much simpler, because nowadays it requires list of screens as one of args to its Composable. There are some workarounds, such as using Kotlin Reflection or using state/remember for maintaining backstack yourself, but it would be great to have read access directly to BackStack#elements.
I don't see why not. As a short term fix, it will do. Feel free to submit a PR.
Otherwise an abstraction over the back stack is on the way to address a more general case. That should also allow for keeping more than one element alive, among other things.
I wonder if there is any way to retrieve all elements from
BackStack
?It can be useful in the following cases:
BackStack
on top of each other, so after navigating back we will not re-render some screens.Composable
. There are some workarounds, such as using Kotlin Reflection or usingstate/remember
for maintaining backstack yourself, but it would be great to have read access directly toBackStack#elements
.@zsoltk WDYT?
The text was updated successfully, but these errors were encountered: