alorma
val coroutineScope = rememberCoroutineScope() val bottomSheetState = rememberModalBottomSheetState( initialValue = ModalBottomSheetValue.Hidden, ) ModalBottomSheetLayout(sheetContent = { Text("Hello!") }) { Button(onClick = { coroutineScope.launch { if (bottomSheetState.isVisible) { bottomSheetState.hide() } else { bottomSheetState.show() } } }) { if (bottomSheetState.isVisible) { Text(text = "Hide") } else { Text(text = "Show") } } }
ms
bottomSheetState
ModalBottomSheetLayout
A modern programming language that makes developers happier.