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
Stylianos Gakis
07/15/2024, 11:55 AM
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
Nikhil Parab
07/15/2024, 12:54 PM
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!