Created
September 21, 2021 07:00
-
-
Save defensive-wizard/135eb983ecd585e78c636de1541b1706 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Text( | |
'This is Google Fonts', | |
style: GoogleFonts.lato( | |
textStyle: Theme.of(context).textTheme.headline4, | |
fontSize: 48, | |
fontWeight: FontWeight.w700, | |
fontStyle: FontStyle.italic, | |
), | |
), | |
// OR You can directly set a text theme | |
final textTheme = Theme.of(context).textTheme; | |
MaterialApp( | |
theme: ThemeData( | |
textTheme: GoogleFonts.latoTextTheme(textTheme).copyWith( | |
body1: GoogleFonts.oswald(textStyle: textTheme.body1), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment