Hamza GATTAL
06/03/2024, 1:58 PMHamza GATTAL
06/03/2024, 2:01 PMval navController = rememberNavController()
Scaffold(
bottomBar = {
BottomNavigation {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = navBackStackEntry?.destination
items.forEach { screen ->
BottomNavigationItem(
...
..,
selected = currentDestination?.hierarchy?.any { it.route == screen.route } == true,
...
)
}
}
}
)
Hamza GATTAL
06/03/2024, 2:31 PM