@OptIn(ExperimentalMaterialNavigationApi::class)
@Composable
fun RootScreen() {
val bottomSheetNavigator = rememberBottomSheetNavigator()
val navController = rememberNavController()
navController.navigatorProvider += bottomSheetNavigator // Add the bottom sheet navigator to your NavController
ModalBottomSheetLayout(bottomSheetNavigator = bottomSheetNavigator) {
Scaffold(
bottomBar = {
BottomNavigationBar(navController)
}
) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(it)
) {
AppNavHost(navController = navController)
}
}
}
}