Marco
08/27/2021, 8:38 AMnavigation(startDestination = "step1", route = "signup") {
composable(route = "step1") {
Step1Screen(hiltViewModel<SignUpViewModel>())
}
composable(route = "step2") {
Step2Screen(hiltViewModel<SignUpViewModel>())
}
composable(route = "step3") {
Step2Screen(hiltViewModel<SignUpViewModel>())
}
}
composable(MainRoutes.ConfirmEmail) {
...
}
my goal is to have the same SignUpViewModel
instance in the three composable. With the current implementation each screens have a different instance (so I lost previous steps states). Any idea to handle this scenario? Because a different solution is to use another NavHost with a different NavigatrionController, but I would avoid ithfhbd
08/27/2021, 8:41 AMColton Idle
08/30/2021, 3:03 AM