Aram Sheroyan
10/13/2021, 3:56 PMCsaba Kozák
10/14/2021, 8:21 AMdata class AppColors(
val primary: Primary = Primary(),
val secondary: Secondary = Secondary(),
val state: State = State(),
val text: Text = Text(),
val background: Background = Background(),
val bw: BlackAndWhite = BlackAndWhite(),
val social: Social = Social(),
val poi: Poi = Poi()
) {
Aram Sheroyan
10/19/2021, 12:54 AMPrimary()
a data class or an object? Since it has to support a dark theme how do you wrap your colors inside the Primary()
so they get updated when dark theme is turned on?copy
and updateColorsFrom
methods for updating them. I can't wrap my head around on how I would do it with grouped colorsCsaba Kozák
10/19/2021, 7:47 AMPrimary()
is a data class. We replace the whole AppColors
when the colors need to be changed. We provide it using a CompositionLocal
, similar to MaterialTheme
.Aram Sheroyan
10/19/2021, 11:41 PM