Is there something in Material 3, to combine Material Extensions with Dark mode. In Material 2, it was like this:
Copy code
val ColorScheme.link: Color
get() = if(isLight) colorX else colorY
But, this doesn’t work with M3?
l
Louis Pullen-Freilich [G]
03/16/2022, 3:44 PM
There isn't, and this approach in general is dangerous and fragile - instead it's better to explicitly provide your own values in a CompositionLocal so it can be defined in the same place as the color scheme, and better kept up to date