backTo

fun <T : NavKey> NavBackStack<T>.backTo(targetScreen: T): Boolean

Removes destinations until targetScreen becomes the current destination.