Skip to content
pubscout

cached_network_svg_image

2.0.0, released 11 months ago by abdelazeem-kuratem.engineer

Load and cache SVG images from the network in Flutter

$ flutter pub add cached_network_svg_image
Source repository

What it does

Provides a widget to easily load, cache, and display network SVG images with built-in placeholder support, error handling, fade-in animations, and cache management functions.

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

Use it when

  • You need to display SVG images fetched from network URLs in your Flutter app.
  • You require automatic offline caching and placeholder/error states for SVGs.

Skip it when

  • You are only rendering local asset or memory-based SVGs.
  • You do not need caching functionality and can directly use flutter_svg.

Strengths

  • Built-in caching via flutter_cache_manager.
  • Supports placeholders, error widgets, and custom fade durations.
  • Provides functions to pre-cache images and clear caches.

Weaknesses

  • Adds an extra dependency layer over flutter_svg and flutter_cache_manager.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
CachedNetworkSVGImage(
    imageUrl: 'https://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg',
    placeholder: const CircularProgressIndicator(color: Colors.green),
    errorWidget: const Icon(Icons.error, color: Colors.red),
    width: 250.0,
    height: 250.0,
    fadeDuration: const Duration(milliseconds: 500),
)

Alternatives

Packages that do the same job and could replace cached_network_svg_image.

  • jovial_svg

    SVG - Robust rendering of Scalable Vector Graphic images, supporting a well-defined profile of SVG, a fast-loading binary storage format, and animation.

  • flyer_chat_image_message

    Image message widget for Flutter chat apps with cross-platform caching, BlurHash, and ThumbHash.

  • image_picker_plus

    In-app image and video picker with built-in cropping, filters, camera, and editing tools.

  • any_image_view

    Dependency-free Flutter image viewer for raster, vector, Lottie, and network sources.

Works with

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