LEVELU
04/16/2024, 3:30 PMfun navigateToTab(tab: BottomBarItem) {
selectedTab = tab
tabBarNavController.navigate(route = "$root/${tab.route}") {
// Avoid multiple copies of the same destination when
// reselecting the same item
launchSingleTop = true
// Restore state when reselecting a previously selected item
restoreState = tab.route != "my-tab-to-reload"
// Pop up to the start destination of the graph to
// avoid building up a large stack of destinations
// on the back stack as users select items
popUpTo(tabBarNavController.graph.findStartDestination().id) {
saveState = true
}
}
}
But it didn't work
Can you help me to do this ?Stylianos Gakis
04/16/2024, 3:58 PM