Skip to content
pubscout

google_fonts

9.0.0, released 8 weeks ago by flutter.dev

Flutter package to load Google Fonts at runtime or bundle them as assets

Flutter FavoriteWASM-readyUses material_ui
$ flutter pub add google_fonts
Source repository

What it does

Provides a simple API to use Google Fonts in Flutter apps. It supports HTTP fetching, caching, and asset bundling, with a lightweight tree‑shakable Lite variant.

AI-written summary of version 9.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need to use Google Fonts without adding large font files to the app
  • Want runtime font fetching during development
  • Want to bundle only the fonts you use to keep the app size small

Skip it when

  • You need a very small bundle and cannot afford the runtime fetch overhead
  • You prefer to manage fonts manually without the convenience API

Strengths

  • Easy to use API with static and dynamic font methods
  • Built‑in caching and asset prioritization
  • Tree‑shakable Lite variant reduces bundle size

Weaknesses

  • Adds a dependency and potential runtime fetch delay
  • Large asset bundle if many fonts are bundled
  • Requires manual asset setup for offline use

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
5

Add `google_fonts` to pubspec dependencies. For offline bundling, download desired font files, place them in an assets folder, and list the folder under `assets:` in pubspec.yaml. No special permissions needed.

Text('Hello', style: GoogleFonts.lato()),

Alternatives

Packages that do the same job and could replace google_fonts.

Works with

Packages commonly used together with google_fonts: ones it builds on, ones built on it, and its own family.