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
navigationManager.commands.collectAsState().value.also { command ->
if (command.destination.isNotEmpty()) {
navController.navigate(command.destination)
}
}
Can cause nullpointer exceptions on recomposition because the navgraph is not initialized yet. It shoudl be something like:
LaunchedEffect(navigationManager.commands){
navigationManager.commands.collect{ command ->
if (command.destination.isNotEmpty()) {
navController.navigate(command.destination)
}
}
}
The text was updated successfully, but these errors were encountered:
navigationManager.commands.collectAsState().value.also { command ->
if (command.destination.isNotEmpty()) {
navController.navigate(command.destination)
}
}
Can cause nullpointer exceptions on recomposition because the navgraph is not initialized yet. It shoudl be something like:
LaunchedEffect(navigationManager.commands){
navigationManager.commands.collect{ command ->
if (command.destination.isNotEmpty()) {
navController.navigate(command.destination)
}
}
}
The text was updated successfully, but these errors were encountered: