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.

Share:
163
Junaid Khalid
Author by

Junaid Khalid

I am a CS graduate and passionate about learning

Updated on January 03, 2023

Comments

  • Junaid Khalid
    Junaid Khalid over 1 year

    I am working on flutter a flutter project and using MaterialApp while providing the ColorScheme I used primaryVariant property but now Official documentation is saying that it is deprecated and asks to use primaryContainer. But I could not find any reasons for that what was wrong with primaryVariant? Why has it been deprecated?