Enable materialYou theme usage.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-01-20 07:39:24 +01:00
parent 45f11d5caf
commit 395f93ca89

View File

@@ -78,11 +78,16 @@ fun AppTheme(
useDarkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable() () -> Unit
) {
val colors = if (!useDarkTheme) {
LightColors
} else {
DarkColors
}
val dynamicColor = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
val colors = when {
dynamicColor && useDarkTheme - > dynamicDarkColorScheme(LocalContext.current)
dynamicColor && !useDarkTheme - > dynamicLightColorScheme(LocalContext.current)
darkTheme - > DarkColors
else - > LightColors
}
MaterialTheme(
colorScheme = colors,