Open
Description
We recently added some extensions directly to TextStyle, and they are really handy:
extension TextStyleHelpers on TextStyle {
TextStyle get bold => copyWith(fontWeight: FontWeight.bold);
TextStyle get italic => copyWith(fontStyle: FontStyle.italic);
TextStyle letterSpace(double value) => copyWith(letterSpacing: value);
}
Now, instead of
TextStyles.body.copyWith(fontWeight: FontWeight.bold, fontStyle: FontStyle.italic, letterSpacing: 1.6)
Can use:
TextStyles.body.bold.italic.letterSpacing(1.6)
I know these are technically not widgests, but I can't think of a better place to house these than this repo :)
Metadata
Assignees
Labels
No labels
Activity