Seems also Material3 colorScheme no more have the concept of isLight, this was super useful to set the status bar icons dark / light mode or to know what palette to extract from images. What would be the new way to achieve that without passing a value all over the app compoenents that needs that info?
👀 1
a
Alexander Karkossa
10/27/2021, 9:10 PM
Copy code
@get:ReadOnlyComposable
val ColorScheme.isLight: Boolean
@get:Composable
get() = isSystemInDarkTheme().not()
t
Tolriq
10/27/2021, 9:18 PM
A theme can be light with system dark mode on depending on user configuration. The check depends on theme inherited from farkcolorsscheme or light one. I suppose the way is to check luminance of backgroundcolor.
a
Alexander Karkossa
10/27/2021, 9:42 PM
You are right. My extension function is more a quick workaround for normal behaviors to quick fix a migration try
t
Tolriq
10/28/2021, 5:53 AM
There's so many missing blocks in Alpha 1 that's it's nearly impossible to do a quick migration. No bottomsheet/ card / switch / radio button / checkbox / ....