The screenshot does not necessarily show if the sheet is over the nav bar or if it's under it but the bar itself is just not transparent.
Also when using
SystemBarStyle.auto()
it does some stuff around the contrast which I remember I found not obvious.
Instead I've done this now
@Composable
private fun EnableEdgeToEdgeSideEffect(
darkTheme: Boolean,
) {
DisposableEffect(darkTheme) {
val systemBarStyle = when (darkTheme) {
true -> SystemBarStyle.dark(Color.TRANSPARENT)
false -> SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT)
}
enableEdgeToEdge(
statusBarStyle = systemBarStyle,
navigationBarStyle = systemBarStyle,
)
onDispose {}
}
}
Which explicitly uses the .dark or .light version depending on if you are in dark or light mode, and this makes the nav bar truly transparent.
This way you also don't need to change the
window.isNavigationBarContrastEnforced
or anything like that