How to hide ModalBottomSheetLayout on Back Press / Back Gesture
Im using Compose via ComposeView in a Fragment backed by Graph Navigation.
Im using ModalBottomSheetLayout and need to hide it on back Press.
I have tried using BackHandler, but it is not working.
BackHandler(enabled = devicesBottomSheetState.isVisible) {
scope.launch {
devicesBottomSheetState.animateTo(ModalBottomSheetValue.Hidden)
}
}