currently using 1.0.0-alpha08 version of navigation with compose
Does it have a official method to determine if the navHost is at startDestination, or I have to implement my own method to deal with it every time I navigate to a new composable?
currently using 1.0.0-alpha08 version of navigation with compose
Does it have a official method to determine if the navHost is at startDestination, or I have to implement my own method to deal with it every time I navigate to a new composable?
found the solution here
NavHostController.addOnDestinationChangedListener { controller, _, _ ->
onStartDestinationFlag.value = (controller.previousBackStackEntry == null)
}