So I am using a bottom drawerlayout and instead of...
# compose
g
So I am using a bottom drawerlayout and instead of using mutableState and remember it uses a special function (from jetpack compose playground):
Copy code
@Sampled
@Composable
fun BottomDrawerSample() {
    val drawerState = rememberBottomDrawerState(BottomDrawerValue.Closed)
    BottomDrawerLayout(
        drawerState = drawerState,
        drawerContent = {
            Button(
                modifier = Modifier.gravity(Alignment.CenterHorizontally).padding(top = 16.dp),
                onClick = { drawerState.close() },
                content = { Text("Close Drawer") }
            )
        },
        bodyContent = {
            Column(
                modifier = Modifier.fillMaxSize().padding(16.dp),
                horizontalGravity = Alignment.CenterHorizontally
            ) {
                Text(text = if (drawerState.isClosed) "▲▲▲ Pull up ▲▲▲" else "▼▼▼ Drag down ▼▼▼")
                Spacer(Modifier.preferredHeight(20.dp))
                Button(onClick = { drawerState.open() }) {
                    Text("Click to open")
                }
            }
        }
    )
}
When I pass in a structure with a mutablestate for the drawer value I can’t open the drawer programmatically. What’s th deal with the special function?