@Anthony
I have a similar use-case, need to prevent the closure of bottom-sheet whenever the user clicks outside of the bottom-sheet or in technical terms, prevent gestures on a ModalBottomSheet. There is an open issue for the same
https://github.com/google/accompanist/issues/730
I noticed that the ModalBottomSheet calls the sheetState,hide() method after it detects any gestures
Modifier.pointerInput(onDismiss) { detectTapGestures { onDismiss() } }
And onDimiss() is
scope.launch { sheetState.hide() }
While testing, by commenting this line out I was able to achieve the required behaviour. So I think a flag can be added for the same as
@jossiwolf recommended in the
issue comments
Have raised a PR for the same.
https://github.com/androidx/androidx/pull/393/files If anyone can look into it 😅 Btw
@Anthony how were you able to achieve your expected behaviour then?