Created
April 22, 2021 19:04
-
-
Save pablobaldez/f388549e1c03355cf44439b0aa42f805 to your computer and use it in GitHub Desktop.
NebraskaTheme com Local
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @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