fun NavController.safeNavigate(direction: NavDirections) {
currentDestination?.getAction(direction.actionId)?.run { navigate(direction) }
}
And instead of navController.navigate
, use navController.safeNavigate
with the same arguments.
* Be the first to Make Comment