0

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?

ming chen
  • 550
  • 4
  • 13

1 Answers1

0

found the solution here

NavHostController.addOnDestinationChangedListener { controller, _, _ ->
            onStartDestinationFlag.value = (controller.previousBackStackEntry == null)
        }

Scaffold with TopAppBar integration with Navigation

ming chen
  • 550
  • 4
  • 13