David Gonzalez
Jun 13, 2023

--

Hi, i'm wondering why not mapping your color and text style to the material ones ?

Because in your sample of code defining your colors, terminology is very similar.
And your text styles data will override default settings done by the material typography. In your example, you don't set all attribute to your text styles, especially font family. So flutter will take default one, defined by material theme data.

Consequently, why not creating extentions to TextTheme with computed attributes instead, and setting your style to approaching TextTheme attribute ?

--

--

David Gonzalez
David Gonzalez

Written by David Gonzalez

Hi, I’m David, a french mobile applications developer. As a freelance, I work on Android and iOS applications since 2010. I also work on Flutter now !

Responses (1)