![]() Var baseTheme = ThemeData(brightness: brightness) You can also use GoogleFonts.latoTextTheme() to make or modify an entire text theme to use the "Lato" font. TextStyle: Theme.of(context).textTheme.displayLarge, ![]() To override the fontSize, fontWeight, or fontStyle: Text( Style: GoogleFonts.lato(textStyle: Theme.of(context).textTheme.headline4), ![]() TextStyle: TextStyle(color: Colors.blue, letterSpacing. To use GoogleFonts with an existing TextStyle: Text( Or, if you want to load the font dynamically: Text( To use GoogleFonts with the default TextStyle: Text( import 'package:google_fonts/google_fonts.dart' Useful for offline-first apps.įor example, say you want to use the Lato font from Google Fonts in your Flutter app.Īdd the google_fonts package to your pubspec dependencies. Matching font files found in assets are prioritized over HTTP fetching.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |