YASAN
10/26/2021, 9:10 PMdarkmoon_uk
10/26/2021, 9:24 PM@Compose
-able declaration.@Composable
might include something like:
val screen by myNavViewModel.screenFlow.collectAsState()
when(screen) {
Screen.A -> screenAContent(screenAViewModel)
Screen.B -> screenAContent(screenBViewModel)
... etc.
}
...perhaps all inside an AnimatedContent
block to effect transition animations etc.Screen
if you want, or any other custom logic.YASAN
10/26/2021, 9:40 PMIan Lake
10/26/2021, 9:43 PMpopUpTo("c/${id}") { inclusive = true }
to your navigate
call then it'll pop everything between your current destination and the previous copy of C. That does nothing if C isn't on the stack at all, so it is safe to call every time you navigate to your new CYASAN
10/26/2021, 10:02 PMpopUpTo
route param and didnt put it like ${id}
.Ian Lake
10/26/2021, 10:04 PMroute
String exactly, character by characterdarkmoon_uk
10/26/2021, 10:04 PMYASAN
10/26/2021, 10:08 PMdarkmoon_uk
10/26/2021, 10:11 PMIan Lake
10/26/2021, 10:11 PMlaunchSingleTop
that lets you specifically avoid multiple repeated copies of C on the top of the stack if you know there's never going to be anything on top of CYASAN
10/26/2021, 10:18 PMIan Lake
10/26/2021, 10:20 PMpopUpTo
is exactly the right tool thenLucien Guimaraes
10/26/2021, 11:01 PMIan Lake
10/26/2021, 11:03 PMLucien Guimaraes
10/26/2021, 11:12 PM