Question: Dismiss bottom sheet programmatically?
JohanAlbrectsen opened this issue · 2 comments
I can dismiss my bottom sheet by navController.popBackStack()
, the issue is there's no animation. It's very rough and flashy, which is bad UX. Am I dismissing / popping the bottom sheet wrong?
Yes, this is not implemented properly. In PR for M3 I've posted our solution which does this properly: #1543 (comment) - but you have to implement your own "destination" type to achieve this.
navController.popBackStack()
is indeed how you dismiss a bottom sheet destination. However, Accompanist doesn't control what that looks like - it just calls sheetState.hide()
.
If you can reproduce the same rough and flashy animation when hiding any bottom sheet that uses ModalBottomSheetLayout
, you should file an issue in the issue tracker.