https://kotlinlang.org logo
Title
u

user

07/18/2022, 5:01 PM
Conditional navigation start destination in jetpack compose I am using navigation-compose along with bottom bar in jetpack compose. I want to show different bottom bar for different type of user. For that, I need to set conditional startDestination in NavHost. How do i do that? I've tried below but it's not setting startDestination val user by remember { mutableStateOf(viewModel.user) }.collectAsState() var startDestination = Screens.UserType1.route LaunchedEffect(user) { startDestination = if (loggedInUser?.userType == UserType.Seller)...