While having a `Scaffold` with a `BottomNavigation...
# compose
l
While having a
Scaffold
with a
BottomNavigation
, in one of the screen I have a view that can display a
ModalBottomSheetLayout
. How to display the bottomsheet on top of the
BottomNavigation
? Even if the default elevation of bottomSheet > bottomNavigation, it's not displaying on top of it.
s
I think you need to have your
Scaffold
inside the `ModalBottomSheetLayout`:
Copy code
ModalBottomSheetLayout(...) {
    Scaffold(bottomBar = { ... }) {
        ...
    }
}
l
Oh ok, that's a bit counter intuitive IMO. As each view has a specific viewModel. For example Screen A -> ViewModel A, Screen B -> ViewModel B. And ModalSheet interaction are specific to Scren/ViewModel B
s
It might also work if you don't use Scaffold's
bottomBar
and create your bottom bar as a sibling to the
ModalBottomSheetLayout
👍 1