AndroidDev, Jetpack Compose.
popBackStack() API actually supports both, but that wasn’t clear when its parameter was just a String. With the type safe APIs, it is much clearer: // Pop up to the topmost instance of the Profile screen, inclusive navController.popBackStack<Profile>(inclusive = true) // Pop up to the exact