when using `ModalBottomSheetLayout`*,* is there a straightforward way to catch a press of the back button and just dismiss the bottom sheet, rather than navigating back entirely? at the moment when I hit back, the entire screen behind the
ModalBottomSheetLayout
is popped too, and I'm trying to avoid that behaviour
➕ 1
james
02/04/2022, 6:08 AM
actually I've just figured this out.
if you don't want to go as far as pushing things up through your navigation layer, you can simply use a
BackHandler
and tie its enabled state to your ModalBottomSheetLayout's state (visible or not)
seems to work well
james
02/04/2022, 6:09 AM
@Colton Idle I see you +1'd my question - I hope my own answer might be helpful to you?