Skip to content

Instantly share code, notes, and snippets.

@pablobaldez
Created April 22, 2021 19:04
Show Gist options
  • Select an option

  • Save pablobaldez/f388549e1c03355cf44439b0aa42f805 to your computer and use it in GitHub Desktop.

Select an option

Save pablobaldez/f388549e1c03355cf44439b0aa42f805 to your computer and use it in GitHub Desktop.
NebraskaTheme com Local
@Composable
fun NebraskaTheme(
group: Group<ColorContext>,
content: @Composable () -> Unit
) {
val isSystemInDarkTheme = isSystemInDarkTheme()
val schema = group.schema(isSystemInDarkTheme)
CompositionLocalProvider(LocalColorSchema provides schema) {
MaterialTheme(
colors = LocalColorSchema.current.materialColors,
content = content
)
}
}
val LocalColorSchema = compositionLocalOf {
ColorSchema.light
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment