Fix ThemeTest

pull/485/head
Nick Rout 2 years ago
parent a34bc2d7c2
commit 61bbd406c5

@ -209,7 +209,11 @@ class ThemeTest {
darkTheme = false, darkTheme = false,
androidTheme = true androidTheme = true
) { ) {
val colorScheme = LightAndroidColorScheme val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
dynamicLightColorScheme(LocalContext.current)
} else {
LightAndroidColorScheme
}
assertColorSchemesEqual(colorScheme, MaterialTheme.colorScheme) assertColorSchemesEqual(colorScheme, MaterialTheme.colorScheme)
val gradientColors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { val gradientColors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
GradientColors() GradientColors()
@ -234,7 +238,11 @@ class ThemeTest {
darkTheme = true, darkTheme = true,
androidTheme = true androidTheme = true
) { ) {
val colorScheme = DarkAndroidColorScheme val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
dynamicDarkColorScheme(LocalContext.current)
} else {
DarkAndroidColorScheme
}
assertColorSchemesEqual(colorScheme, MaterialTheme.colorScheme) assertColorSchemesEqual(colorScheme, MaterialTheme.colorScheme)
val gradientColors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { val gradientColors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
GradientColors() GradientColors()

Loading…
Cancel
Save