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 have navigation pattern which looks like the screenshot below. I want my ViewModel to stay alive inside the Navigator2.
The initial screen is ChatListScreen. If I want to push a new navigator to the first one, it's not possibile to do so. Instead I wrap the screen into another screen, which has only Navigator(screen) as content it works.
data class NavigatorScreen(val screen: Screen): Screen {
@Composable
override fun Content() {
Navigator(screen)
}
}
But this breaks the backstack, since the wrapper is also a screen.
What is the best way to achieve the below navigation pattern?
PS: I've achieved this using koin scopes, but I wanted to try the new navigatorViewModel.
The text was updated successfully, but these errors were encountered:
to keep the ViewModel instance when navigating between chat and media screen. It should stay alive inside the navigator 2, but should die when navigating back from chat screen
I have navigation pattern which looks like the screenshot below. I want my ViewModel to stay alive inside the Navigator2.
The initial screen is ChatListScreen. If I want to push a new navigator to the first one, it's not possibile to do so. Instead I wrap the screen into another screen, which has only
Navigator(screen)
as content it works.But this breaks the backstack, since the wrapper is also a screen.
What is the best way to achieve the below navigation pattern?
PS: I've achieved this using koin scopes, but I wanted to try the new navigatorViewModel.
The text was updated successfully, but these errors were encountered: