On compose naming conventions: what would be the b...
# compose
f
On compose naming conventions: what would be the best name for the below method?
Copy code
@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).
👀 1
f
I don't know about official conventions but I would call it something like
SystemBarConfigurator
or
SystemBarColorController
. In activity compose artifact there is
BackHandler
so I would think that this should be similar.
👍 3