goBackUntil

fun goBackUntil(destKey: KClass<out Route>, inclusive: Boolean = false): Boolean

Go back call until destination is satisfied. It also considers destination from parent navigation.

Note: The result may not be expected but it will mostly be theoretically correct. For eg: If a destination is currently used only for for nested navigation then it will choose the initial key of this nested navigation if inclusive is false.

Throws

if destKey doesn't exist in the backstack or destKey is DialogRoute.