is there a way I can open a similar screen in comp...
# compose
r
is there a way I can open a similar screen in compose? in KMP? I tried full screen bottom sheet and disabled the swipe down, but if there is a scrollable column inside it, it becomes buggy (scrolling the column, dismisses the bottom sheet)
screen-20250604-225336.mp4
here is the code
Copy code
composable<MainScreenRoute.CreateReceipt> {
    Box(
        Modifier.background(WaraqaTheme.colors.background)
    ) {
        ModalBottomSheet(
            modifier = Modifier.fillMaxSize()
                .statusBarsPadding(),
            onDismissRequest = {},
            sheetState = rememberModalBottomSheetState(
                confirmValueChange = { false },
                skipPartiallyExpanded = true
            ),
            dragHandle = {},
            shape = RectangleShape,
            properties = ModalBottomSheetProperties(shouldDismissOnBackPress = false)
        ) {
            CreateReceiptScreen(
                closeScreen = {
                    navController.popBackStack()
                }
            )
        }
    }
}
I noticed that
ModalBottomSheet
is not very stable with disabling dismissal (maybe expected as its still experimental)
Worked! used BottomSheetScaffold instead just wanna see how to create a new viewmodel on each open
Copy code
BottomSheetScaffold(
    scaffoldState = bottomSheetScaffoldState,
    sheetShape = RectangleShape,
    sheetDragHandle = {},
    sheetSwipeEnabled = false,
    sheetContent = {
        Box(Modifier.fillMaxSize()) {
            CreateReceiptScreen(
                closeScreen = {
                    coroutineScope.launch {
                        bottomSheetScaffoldState.bottomSheetState.hide()
                    }
                }
            )
        }
    }
) { 
   Scaffold {...}
}