Raed Ghazal
06/04/2025, 7:51 PMRaed Ghazal
06/04/2025, 7:54 PMRaed Ghazal
06/04/2025, 7:54 PMcomposable<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()
}
)
}
}
}
Raed Ghazal
06/04/2025, 7:55 PMModalBottomSheet
is not very stable with disabling dismissal (maybe expected as its still experimental)Raed Ghazal
06/04/2025, 8:13 PMBottomSheetScaffold(
scaffoldState = bottomSheetScaffoldState,
sheetShape = RectangleShape,
sheetDragHandle = {},
sheetSwipeEnabled = false,
sheetContent = {
Box(Modifier.fillMaxSize()) {
CreateReceiptScreen(
closeScreen = {
coroutineScope.launch {
bottomSheetScaffoldState.bottomSheetState.hide()
}
}
)
}
}
) {
Scaffold {...}
}