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. Font file caching, on device file system.
Can also be used in production to reduce app size