Suresh Maidaragi
11/07/2023, 2:22 AMprecompose
for navigation, we have bottomBarNavigation in the screen, as shown below
@Composable
fun Navigation(navigator: Navigator, viewModel: DashboardViewModel) {
NavHost(navigator = navigator, initialRoute = NavigationItem.Dashboard.route) {
scene(NavigationItem.Dashboard.route) {
DashboardScreen({}, {})
}
scene(NavigationItem.Channel.route) {
ChannelScreen()
}
scene(NavigationItem.Video.route) {
VideoScreen()
}
}
}
When we tap between any tabs multiple times, clicked tabs getting added to stack, when we click hardware back button on android app, all tabs popbacks, Is there way to maintain only 1 instance of tab in stack?khalid64927
11/07/2023, 5:45 AMSuresh Maidaragi
11/08/2023, 10:50 AMNavOptions(launchSingleTop = true)
helped me