Solomon Tolu Samuel
01/23/2022, 4:56 PMColton Idle
01/23/2022, 5:07 PMval navBackStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = navBackStackEntry?.destination
My logic for the above was taken from 3 places:
1. Ian Lakes help on #compose (would literally be lost without him 🙏 )
2. Docs on compose + nav + bottom nav https://developer.android.com/jetpack/compose/navigation#bottom-nav
3. Docs on handling VM events has login/logout as an example. Super helpful: https://developer.android.com/jetpack/guide/ui-layer/events#handle-viewmodel-events
Overall, it sounds like you're on the right track but you need to move your navigation bar up one level.Solomon Tolu Samuel
01/24/2022, 2:17 AM