This commit is contained in:
vfsfitvnm
2022-07-22 21:28:59 +02:00
parent 6474b52490
commit 6a8fdb7c11
4 changed files with 15 additions and 6 deletions

View File

@@ -232,12 +232,12 @@ class BottomSheetState(
}
@Composable
fun rememberBottomSheetState(lowerBound: Dp, upperBound: Dp): BottomSheetState {
fun rememberBottomSheetState(lowerBound: Dp, upperBound: Dp, isExpanded: Boolean = false): BottomSheetState {
val density = LocalDensity.current
val coroutineScope = rememberCoroutineScope()
var wasExpanded by rememberSaveable {
mutableStateOf(false)
mutableStateOf(isExpanded)
}
return remember(lowerBound, upperBound, coroutineScope) {