destinationChangeEvents

Create a Flow of destination change events on the NavController instance.

Note: Created flow keeps a strong reference to the NavController instance until the coroutine that launched the flow collector is cancelled.

Example of usage:

navController.destinationChangeEvents()
.onEach { event ->
// handle destination change event
}
.launchIn(uiScope)