ModalBottomSheet for Compose
Record.mp4
BottomSheet(sheetContent = {/*TODO sheet content here */ }) {
val bottomSheetState = LocalBottomSheetState.current
val coroutineScope = rememberCoroutineScope()
Button(onClick = {
coroutineScope.launch {
// show bottomSheet
bottomSheetState.show()
}
}) {
Text(text = "show")
}
}Step 1. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}Step 2. Add the dependency
dependencies {
implementation 'com.github.Delsart:ComposeModalBottomSheet:v0.0.1'
}