GoogleFonts flutter code example
Example 1: google fonts for flutte
//installation of google fonts in flutter (pubspec.yaml)
//please ignore the text after two slashes!
dependencies:
google_fonts: ^1.1.1 //(current one is this)
$ flutter pub get // => (this means click on the pub get option[kinda apply]).
Example 2: flutter googlefonts.
Text(
'This is Google Fonts',
style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.display1,
fontSize: 48,
fontWeight: FontWeight.w700,
fontStyle: FontStyle.italic,
),
),