james
08/14/2022, 12:03 AMMaterialTheme
in any way, nor share its naming system: how do you handle certain Material composables which hardcode colours and do not provide a way to override them?
the only way I can think of to do this is to create a MaterialTheme
and try my best to match my design system colours to the Material ones (Primary, OnPrimary, Surface, OnSurface etc).. then when I need to use a certain Material composable that doesn’t allow me to override the colour I can use CompositionLocalProvider
to wrap that particular composable
☝️ this seems like it would work, but I wonder if there’s a cleaner way to achieve this?Colton Idle
08/14/2022, 1:14 AMZoltan Demant
08/14/2022, 2:56 AMK Merle
08/14/2022, 9:25 AMZoltan Demant
08/14/2022, 9:29 AMjames
08/14/2022, 10:53 PMfun MyTheme.toMaterial3ColorScheme(darkMode: Boolean)
I suppose I should have done this all along, but I was trying to get away with not having to maintain (or sit down and think about 😅) a mapping for my theme <-> material theme