Skip to content

Instantly share code, notes, and snippets.

@samuelematias
Forked from faustobdls/extension.dart
Created May 12, 2020 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelematias/798025d0411bdace8bf353aae03dd61e to your computer and use it in GitHub Desktop.
Save samuelematias/798025d0411bdace8bf353aae03dd61e to your computer and use it in GitHub Desktop.
extension TextExtension on Text {
Text h1({TextStyle style}) {
TextStyle defaultStyle = TextStyle(
fontFamily: 'Nunito_Sans',
fontSize: 36,
fontWeight: FontWeight.w900,
fontStyle: FontStyle.normal,
letterSpacing: -0.02,
color: SoulphiaTheme.defaultGraySwatch[50],
);
return Text(this.data, style: (this.style ?? defaultStyle).merge(style ?? defaultStyle));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment