fabio.carballo
08/20/2021, 8:28 AMModalBottomSheetLayout
and I want to show a view depending on whether the content
is being scrolled or not.
public fun BottomSheetLayout(
modifier: Modifier = Modifier,
sheetState: ModalBottomSheetState = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden),
scrollableState: ScrollableState? = null,
sheetContent: @Composable () -> Unit,
content: @Composable () -> Unit
) {
val isScrolling = ??? // how to figure out the sheetContent is scrolling
ModalBottomSheetLayout(
modifier = modifier,
sheetContent = {
DraggableTopArea(isScrolling)
sheetContent()
},
sheetState = sheetState,
sheetShape = RoundedCornerShape(
topStart = BentoTheme.cornerRadiuses.M,
topEnd = BentoTheme.cornerRadiuses.M
),
sheetElevation = BentoTheme.elevations.lvl4,
sheetBackgroundColor = BentoTheme.colors.white,
sheetContentColor = LocalContentColor.current,
scrimColor = BentoTheme.colors.dark64,
content = content
)
}
In this case the usage would be :
BottomSheetLayout(
...,
sheetContent = {
LazyColumn()
},
...
)
And I would like to internally understand if the LazyColumn
is being scrolled or not.