Jason Ankers
04/08/2021, 7:51 AMcurrentRoute == screen.route
, but what if we’re on a nested route beneath this? https://developer.android.com/jetpack/compose/navigation#bottom-navIan Lake
04/08/2021, 8:08 PMnavBackStackEntry.destination.parent
- that's the parent NavGraph. I don't think we fill out the route in that as of yet, but the plan is for route
to become a field on NavDestination
itself (just like id
is right now), which would make this quite a bit easierJason Ankers
04/09/2021, 2:24 AMroute
available on NavDestination
would be really helpful. As a workaround for now I’ve just added a property children
to my Screen
sealed class which contains a list of child routes. Then to determine if a bottom nav item is selected I just check if currentRoute
exists in children