myanmarking01/07/2022, 11:21 AM
and injected into the theme with CompositionLocalProvider. So in a composable, i can do MaterialTheme.brandColor.blue and it will resolve for light and dark. My problem: I used to resolve this colors in the viewMode, like using R.brand.blue and it was fine. In compose, i cannot do that, because it required a composable context. What can i do ?
val MaterialTheme.brandColor: BrandColor @Composable @ReadOnlyComposable get() = LocalBrandColor.current
mattinger01/07/2022, 6:18 PM
Colton Idle01/08/2022, 9:06 AM
Jetsnack's major feature is demonstrating how to implement a custom design system. Jetsnack has a bespoke color system and does not use Material color theming.I base all of my compose apps color systems based on this code: https://github.com/android/compose-samples/tree/main/Jetsnack