Skip to content
pubscout

network_font

0.0.5, released 2 years ago by an unverified publisher

Load custom fonts from the network without storing them in local asset folders.

$ flutter pub add network_font
Source repository

What it does

Downloads custom fonts from a network URL and caches them locally using Hive and path_provider. Provides utility widgets, text styles, and extensions to render text using the downloaded network fonts.

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

Use it when

  • You need to load dynamic or custom fonts from a remote server.
  • You want to avoid bloating your app bundle with static font assets.

Skip it when

  • You require fonts to be bundled securely offline for first-load guarantees without network connectivity.
  • You are using font formats other than OpenType (OTF) and TrueType (TTF).

Strengths

  • Automates caching and expiration management for network fonts.
  • Offers multiple ways to use fonts via widgets, text styles, or extensions.

Weaknesses

  • Limited to OTF and TTF font formats.
  • Requires active internet connection on the first load to download fonts.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

No special native permissions or build_runner required; uses path_provider, http, and hive under the hood.

final NetworkFont _networkFont = NetworkFont('family', url:'font_url');

NetworkFontText(
    'NetworkFontText Widget',
    font: _networkFont,
    style: TextStyle(fontSize: 18),
);

Alternatives

Packages that do the same job and could replace network_font.

Works with

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