Creé una hoja inferior en Jetpack Compose. Pero cuando la hoja inferior se expande, la hoja inferior fuera del fondo no se oscurece como lo hacen las hojas inferiores habituales. Por favor ayuda.
MyApplicationTestTheme { ProvideWindowInsets { BottomSheetScaffold( scaffoldState = bottomSheetScaffoldState, sheetShape = RoundedCornerShape(topStart = 30.dp,topEnd = 30.dp), sheetElevation= 5.dp, modifier=Modifier.fillMaxHeight(0.95f).fillMaxWidth(), sheetBackgroundColor=Color.Green, sheetContent = { //Bottom sheet content }, sheetPeekHeight = 0.dp ) { // Page Content } } }La hoja inferior no tiene una función de atenuación predeterminada.
Puede usar ModalBottomSheetLayout o BottomDrawer para lograr ese efecto. Pero ninguno de estos diseños tiene altura de vista, solo estados de expansión.
ModalBottomSheetLayout( sheetState = modalBottomSheetState, sheetElevation = 8.dp, sheetContent = { SheetContent() } ) { MainContent(modalBottomSheetState) }O
val drawerState = rememberBottomDrawerState(BottomDrawerValue.Closed) BottomDrawer( gesturesEnabled = gesturesEnabled, drawerState = drawerState, drawerContent = { }, content = { } )