Skip to content
pubscout

precached_network_image

1.4.1, released 11 months ago by janlionly.dev

Load and cache network images to disk and memory to avoid display delays.

$ flutter pub add precached_network_image
Source repository

What it does

Provides a widget and manager to load, disk-cache, and memory-precache network images in Flutter applications. It helps prevent flash screens or flickering caused by network image download delays across iOS, Android, and Web.

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

Use it when

  • You want to avoid network image loading delay and flashing/flickering on screen.
  • You need dual-layer caching (memory and disk) for network images with explicit precaching control.

Skip it when

  • You require advanced image manipulation features like cropping or complex transformations.
  • You are already using a comprehensive image handling solution like cached_network_image.

Strengths

  • Supports dual-layer caching with memory and disk storage.
  • Provides manual precaching controls via a manager class.
  • Supports multi-platform including iOS, Android, and Web.

Weaknesses

  • Lacks advanced image transformations, cropping, or editing features.
  • Relies on manual manager calls for advanced precaching workflows.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
5

not documented

PrecachedNetworkImage(
  url: 'https://picsum.photos/200',
  width: 200, 
  height: 200,
  precache: true,
  fit: BoxFit.fill,
  placeholder: (context, url) => const Icon(Icons.person),
  errorWidget: (context, url, error) => const Icon(Icons.error),
)

Alternatives

Packages that do the same job and could replace precached_network_image.

  • cached_network_image

    It is a more widely adopted, robust package for downloading, caching, and displaying network images.

  • octo_image

    It provides advanced placeholder and error building strategies for network images.

Works with

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