1
1
package dev.openfeature.sdk.sampleapp.ui.theme
2
2
3
- import android.app.Activity
4
3
import android.os.Build
5
4
import androidx.compose.foundation.isSystemInDarkTheme
6
5
import androidx.compose.material3.MaterialTheme
@@ -11,17 +10,18 @@ import androidx.compose.material3.lightColorScheme
11
10
import androidx.compose.runtime.Composable
12
11
import androidx.compose.ui.platform.LocalContext
13
12
14
- private val DarkColorScheme = darkColorScheme(
13
+ private val DarkColorScheme =
14
+ darkColorScheme(
15
15
primary = Purple80 ,
16
16
secondary = PurpleGrey80 ,
17
17
tertiary = Pink80
18
18
)
19
19
20
- private val LightColorScheme = lightColorScheme(
20
+ private val LightColorScheme =
21
+ lightColorScheme(
21
22
primary = Purple40 ,
22
23
secondary = PurpleGrey40 ,
23
24
tertiary = Pink40
24
-
25
25
/* Other default colors to override
26
26
background = Color(0xFFFFFBFE),
27
27
surface = Color(0xFFFFFBFE),
@@ -30,7 +30,7 @@ private val LightColorScheme = lightColorScheme(
30
30
onTertiary = Color.White,
31
31
onBackground = Color(0xFF1C1B1F),
32
32
onSurface = Color(0xFF1C1B1F),
33
- */
33
+ */
34
34
)
35
35
36
36
@Composable
@@ -40,7 +40,8 @@ fun OpenFeatureTheme(
40
40
dynamicColor : Boolean = true,
41
41
content : @Composable () -> Unit
42
42
) {
43
- val colorScheme = when {
43
+ val colorScheme =
44
+ when {
44
45
dynamicColor && Build .VERSION .SDK_INT >= Build .VERSION_CODES .S -> {
45
46
val context = LocalContext .current
46
47
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
0 commit comments