Guilherme Delgado
05/18/2021, 11:44 AMjava.lang.NullPointerException: Attempt to invoke virtual method 'androidx.navigation.NavDestination$DeepLinkMatch androidx.navigation.NavGraph.matchDeepLink(androidx.navigation.NavDeepLinkRequest)' on a null object reference
my setup is:
setContent {
val navController = rememberNavController()
NavHost(navController, startDestination = NavRouting.Home.destination) {
composable(NavRouting.Home.destination) { ... }
...
}
navigationManager.commands.collectAsState().value.also { command ->
if (command.destination.isNotEmpty()) {
navController.navigate(command.destination) { launchSingleTop = true }
}
}
}
Regarding navigation events with MutableStateFlow
I was inspired by Joe Birch post.
What am I doing wrong? 🤔 Thanks.Guilherme Delgado
05/18/2021, 11:51 AMcollectAsState(NavRouting.Idle)
it fixes it, where NavRouting.Idle
destination = “”Ian Lake
05/18/2021, 1:42 PMGuilherme Delgado
05/18/2021, 1:54 PMLaunchedEffect