Compare commits
No commits in common. "580c5b66118831a740dc2fd096ce7a6b41531dcd" and "0494efc2ad21ff35055536fd5ebfa92c31716995" have entirely different histories.
580c5b6611
...
0494efc2ad
@ -45,9 +45,16 @@ private val LightColorScheme = lightColorScheme(
|
||||
@Composable
|
||||
fun BitcoinSummarizerTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
// Dynamic color is available on Android 12+
|
||||
dynamicColor: Boolean = true,
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
val colorScheme = when {
|
||||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
val context = LocalContext.current
|
||||
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||
}
|
||||
|
||||
darkTheme -> DarkColorScheme
|
||||
else -> LightColorScheme
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user