navigateTransient

fun NavController.navigateTransient(destination: KDestination, popUpToDestination: KDestination, inclusive: Boolean = true)(source)

Navigates to a KDestination while clearing the current destination from the back stack inclusively, ensuring its ViewModel and screen state are destroyed.