0

How do I set the text style to headline1 or body1 like it is described in the "Material Text Scale: Modernizing Flutter Text Theming" section of the Flutter 1.17 Announcement article

final TextStyle TEXT_STYLE = GoogleFonts.lato(textStyle: *something in here?*);
DrkStr
  • 1,752
  • 5
  • 38
  • 90

1 Answers1

1

You can do this by creating a TextTheme object and using the available styles.

In your example:

final TextStyle TEXT_STYLE = GoogleFonts.lato(textStyle: TextTheme().bodyText1);
Marcel Mayr
  • 111
  • 5