Why has primaryVariant property been deprecated?
163
That's because of the changes in Material Design 3. Use primaryContainer
for elements needing less emphasis than primary, instead of primaryVariant
.
Here's the pull request affects this: https://github.com/flutter/flutter/pull/93427.
You can check the Material Design 3 doc for more detail: https://m3.material.io/styles/color/the-color-system/color-roles.
Author by
Junaid Khalid
I am a CS graduate and passionate about learning
Updated on January 03, 2023Comments
-
Junaid Khalid over 1 year
I am working on flutter a flutter project and using
MaterialApp
while providing theColorScheme
I usedprimaryVariant
property but now Official documentation is saying that it is deprecated and asks to useprimaryContainer
. But I could not find any reasons for that what was wrong withprimaryVariant
? Why has it been deprecated?