I couldn’t find a mention of this, is it at all po...
# compose
o
I couldn’t find a mention of this, is it at all possible to have rounded corners for a bottomsheet opened from navigation
Copy code
bottomSheet(route = "") { 
    content()
}
I tried having a card with rounded corners as root, also setting bg to transparent just gives white bg thanks!
j
You can pass a shape to the
ModalBottomSheetLayout
that hosts your
NavHost
, but different sheet shapes per destination aren't supported right now. That being said, I'd question the UX of different sheet shapes in one app anyway 🙂
o
brilliant! no only one shape for all 😄 thank you!
m
To be honest, i tend to only use "composable" for nav graphs. I haven't found a great use case for using dialog or bottomSheet, as they are normally a function of the particular page they are on. I haven't found much need to use either of these as destinations.
o
one issue we have to fix (which is why i opted for bottom sheet for this detail screen) our main page contains a lazycolumn with bunch of items each with its own viewmodel - when we open a composable and come back, things try to reload and somehow we lose the scroll position - not sure why exactly