A flutter library to help lift up some tedious tasks in setting up material theme properly.
ModifyTextTheme
an extension of TextTheme
to easily bulk update either or both display and body text styles.
I only expose fontFamily
and color
because I believe only those two should be modified. But in case you need more, you can always call copyWith from any TextTheme
and TextStyle
.
To understand more about material type system, read here.
final TextTheme result = Typography.englishLike2018
.modifyDisplayStyles(fontFamily: 'Montserrat', color: Colors.green);
final TextTheme result = Typography.englishLike2018
.modifyBodyStyles(fontFamily: 'Lato', color: Colors.red);
final TextTheme result = Typography.englishLike2018
.modifyDisplayStyles(fontFamily: 'Montserrat', color: Colors.green)
.modifyBodyStyles(fontFamily: 'Lato', color: Colors.red);