Skip to content

Instantly share code, notes, and snippets.

@arriolac
Created September 26, 2022 18:22
Show Gist options
  • Save arriolac/b28583031ce34c08bab39007be579f7b to your computer and use it in GitHub Desktop.
Save arriolac/b28583031ce34c08bab39007be579f7b to your computer and use it in GitHub Desktop.
// Copyright 2022 Google LLC.
// SPDX-License-Identifier: Apache-2.0
private val LightColors = lightColorScheme(
primary = md_theme_light_primary,
// …
)
private val DarkColors = darkColorScheme(
primary = md_theme_dark_primary,
// …
)
@Composable
fun JetsurveyTheme(
useDarkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {
val colors = if (!useDarkTheme) {
LightColors
} else {
DarkColors
}
// …
MaterialTheme(
colorScheme = colors,
shapes = Shapes,
typography = Typography,
content = content,
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment