navigateClearingStack

fun navigateClearingStack(destination: String, navigationData: Map<String, AnySerializable>? = null, launchSingleTop: Boolean = true)

Clears this backstack entirely and pushes destination as its only entry — the mechanism behind NavigateClearingStack.

Parameters

destination

screen id to navigate to.

navigationData

navigation arguments the destination receives.

launchSingleTop

when true (the default) and destination is already the current top entry, this call is a no-op — the stack isn't cleared and no duplicate entry is pushed.