bryansills
10/16/2020, 4:02 PM@Composable
fun BasicNav() {
var isLoggedIn by remember { mutableStateOf(false) }
NavHost(startDestination = "Profile") {
composable("Profile") { Profile(isLoggedIn) { isLoggedIn = !isLoggedIn } }
composable("Dashboard") { Dashboard() }
if (isLoggedIn) {
composable("Scrollable") { Scrollable() }
}
}
}
(the lambda passed into Profile()
) is just connected to a Button
to toggle the logged in stateIan Lake
10/16/2020, 6:45 PMbryansills
10/16/2020, 8:22 PM