In compose type safe navigation, we can check if c...
# compose
n
In compose type safe navigation, we can check if current route was generated from a specific T class using hasRoute<>, can we check if we are in specific navGraph ?
1
1️⃣ 1
1
s
Are you looking to do something like look at your route's
hierarchy
, and try to match if any of those items are matching the navgraph route?
n
Checking in
hierarchy
for the navGraph works. I thought it wouldn't work since when I logged the backstack, navGraph's data object's name wasn't present there, Thanks!
👍 1
119 Views