val queue = navController.backQueue
backQueue becomes private in androidx.navigation:navigation-runtime:2.6.0-alpha07@aar
Is there any substitute?
It seems like you can temporarily access currentBackStack in NavController.
/**
* Retrieve the current back stack.
*
* @return The current back stack.
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public val currentBackStack: StateFlow<List<NavBackStackEntry>> =
_currentBackStack.asStateFlow()
Please make sure you read this first: https://issuetracker.google.com/issues/217465473#comment6 to fully understand the consequences as this API, just like backQueue, might not be stable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With