google_fontsとは
fonts.google.comのフォントを使用するための Flutter パッケージです。
![](https://sogablog.net/wp-content/uploads/cocoon-resources/blog-card-cache/f6118411f387345f09758c9669bdb16c.png)
google_fonts | Flutter Package
A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.
使い方
TextのStyleに付与する
Text(
'This is Google Fonts',
style: GoogleFonts.lato(),
)
TextThemeに設定する
return MaterialApp(
theme: ThemeData(
textTheme: GoogleFonts.latoTextTheme(Theme.of(context).textTheme),
),
);