https://kotlinlang.org logo
#compose
Title
# compose
t

theapache64

08/19/2021, 3:25 PM
Question: [Navigation Compose]: How can i get number of items in the backstack using
NavHostController
?
navController.backQueue.size
??
i

Ian Lake

08/19/2021, 3:32 PM
That is purposefully not public API
It sounds like a case of https://xyproblem.info/
What are you trying to do that led you to that question?
1
t

theapache64

08/19/2021, 3:36 PM
Okay 😄 I’ll come back with the problem
but
backQueue
is public 🤔
i

Ian Lake

08/19/2021, 3:39 PM
It is exposed only as part of the
navigation-testing
library in
TestNavHostController
t

theapache64

08/19/2021, 3:41 PM
but, then why am not getting any warnings when I try to access in application module? 🤔
a

Adam Powell

08/19/2021, 4:51 PM
consider it the androidx version of `@RequiresOptIn annotation class InternalNavigationApi`; it can change without warning in any update of the library and is not intended to be used outside of the library group
🆗 1
7 Views