I'm writing a compose multiplatform app using `Mod...
# compose
c
I'm writing a compose multiplatform app using
ModalBottomSheet
. When the sheet opens the status bar uses dark icons but the background is black so they become invisible. How can I change them to be light again? In the "normal" android
ModalBottomSheet
you can use
ModalBottomSheetProperties.isAppearanceLightStatusBars
but this is missing from multiplatform. I also can't use the normal
enableEdgeToEdge
because this is for the Activity's window, not the bottomsheet's window (I think that's a new window like a dialog?)
a
I don't think you can. On the bright side, the compose unstyled library has a modal bottom sheet that doesn't change the system bars, and gives you the window as a Local so that you can do the styling on your own
c
That's a good hint! I'll try that
Shame that the "official" sheet can't do something so basic....it really breaks the app right now
👍 1
e
Hey, sorry to bring up this old thread, but I am running into the same issue, multiplatform variant doesn't expose this parameter still... Did you find a solution?
Found a solution, if I provide a
contentColor
for the bottom sheet, it applies the correct color for the status bars internally
Copy code
ModalBottomSheet(
    <...>
    contentColor = AppTheme.colors.onSurface,
)
c
Ha, that's a sweet workaround. I'm actually not sure if we ever solved that one. Thanks!
👍 1
223 Views