So i’m starting to play with BottomSheetModalLayou...
# compose
m
So i’m starting to play with BottomSheetModalLayout, the issue i’m having is that i’m in a Scaffold already, and using the NavController to control the content. If the content area has the BottomSheetModalLayout then it’s scrim doesn’t cover the TopAppBar of the main screen. If i move the BottomSheetModalLayout to be a parent of the Scaffold, i could presumably cover the TopAppBar with a scrim, but then i have to know at the top level what all my dialogs look like. I’m wondering what approach people are taking to solve this issue.
I even tried to create a remembered composable function pointer:
Copy code
val emptyDialogContent: @Composable () -> Unit = { Box { } }
    val (modalBottomSheetContent, modalBottomSheetContentChanged) = remember {
        mutableStateOf(emptyDialogContent)
    }
but i get a wierd error:
Copy code
java.lang.IllegalArgumentException: The initial value must have an associated anchor.
        at androidx.compose.material.SwipeableState.ensureInit$material_release(Swipeable.kt:138)
        at androidx.compose.material.SwipeableKt$swipeable$3.invoke(Swipeable.kt:594)