createMdcTheme() reads secondaryVariant from the applied theme, but does not set the value in darkColors(). The darkColors() function allows this because it defaults the secondaryVariant parameter to match secondary, but users of the theme adapter should have a choice.
createMdcTheme()
readssecondaryVariant
from the applied theme, but does not set the value indarkColors()
. ThedarkColors()
function allows this because it defaults thesecondaryVariant
parameter to matchsecondary
, but users of the theme adapter should have a choice.That is, the line after this one:
https://github.com/material-components/material-components-android-compose-theme-adapter/blob/3d89d95f9ec39c253e8609c7a503425070cae53d/materialLib/src/main/java/com/google/android/material/composethemeadapter/MdcTheme.kt#L209
should be something like:
secondaryVariant = secondaryVariant.takeIf { it != Color.Unspecified } ?: secondary,
to allow users to have a
secondaryVariant
value that differs fromsecondary
in dark mode.Thank you.