Skip to content

Instantly share code, notes, and snippets.

@faustobdls
Created February 3, 2020 23:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save faustobdls/bd50e9b3bc698c4e30b49223c95e7a46 to your computer and use it in GitHub Desktop.
Save faustobdls/bd50e9b3bc698c4e30b49223c95e7a46 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