Colton Idle
05/13/2022, 6:00 PMisLight
via MaterialTheme.colors.isLight
or should I basically never be touching MaterialTheme static accessors? (themeing still confuses me, sorry 🙃 )Zach Klippenstein (he/him) [MOD]
05/13/2022, 6:04 PMTolriq
05/13/2022, 6:04 PMColton Idle
05/13/2022, 6:32 PMval systemUiController = rememberSystemUiController()
val useDarkIcons = MaterialTheme.colors.isLight
SideEffect {
// Update all of the system bar colors to be transparent, and use dark icons if we're in light
// theme
systemUiController.setSystemBarsColor(color = Color.Transparent, darkIcons = useDarkIcons)
}
Tolriq
05/13/2022, 6:43 PMval LocalThemeDarkMode: ProvidableCompositionLocal<Boolean> =
staticCompositionLocalOf { error("LocalThemeDarkMode not initialized") }
Oleksandr Balan
05/13/2022, 7:08 PMandroidx.compose.foundation.isSystemInDarkTheme()
directly as default theme wrapper use it to check which palette to provide?Tolriq
05/13/2022, 7:13 PMChris Sinco [G]
05/13/2022, 9:53 PMThomas
05/13/2022, 11:17 PMval ColorScheme.isLight get() = background.luminance() > 0.5f