I made a custom NavGraph for the Sign Up process:
@RootNavGraph
@NavGraph()
annotation class SignUpNavGraph(
val start: Boolean = false
)
Other composable destinations are making use of the RootNavGraph. I am trying to navigate from:
@SignUpNavGraph()
@Destination
@Composable
fun SignUpTwoScreen(
navigator: DestinationsNavigator,
scaffoldState: ScaffoldState
) ..
to
@Destination(
navArgsDelegate = VerifyScreenNavArgs::class
)
@Composable
fun VerifyScreen(
navigator: DestinationsNavigator,
verifyEmailViewModel: VerifyEmailViewModel = hiltViewModel()
) ..
with
navigator.navigate(
VerifyScreenDestination(viewModel.email, viewModel.password)
)
navigator.popBackStack()
It seems that I cannot navigate from the SignUpTwoScreen to the VerifyScreen.
I am using this awesome open-source project Compose Destinations. Documentation can be found here