Enable materialYou theme usage.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -78,12 +78,17 @@ 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,
|
||||
content = content
|
||||
|
||||
Reference in New Issue
Block a user