Frank van der Laan
05/31/2022, 6:47 AM@Composable
fun ConfigureSystemBars(
isContentDark: Boolean = defaultIsContentDark,
) {
val systemUiController = rememberSystemUiController()
val isDarkTheme = isSystemInDarkTheme()
LaunchedEffect(isContentDark) {
systemUiController.setSystemBarsColor(
color = Color.Transparent,
darkIcons = isContentDark && !isDarkTheme,
isNavigationBarContrastEnforced = false,
)
}
}
It sort of feels (when using it in a component), like it’s displaying a component now. It’s not returning anything, so it cannot be called configureSystemBars
(lower case).Filip Wiesner
05/31/2022, 7:15 AMSystemBarConfigurator
or SystemBarColorController
. In activity compose artifact there is BackHandler
so I would think that this should be similar.