cached_network_image_widget 1.0.0 copy "cached_network_image_widget: ^1.0.0" to clipboard
cached_network_image_widget: ^1.0.0 copied to clipboard

A Flutter package providing advanced CachedNetworkImage and SVG image caching with BlurHash placeholders and shimmer effects.

πŸ–Ό Cached Network Image Widget #

The Cached Network Image Widget package provides a simple, customizable way to display network images and SVGs in your Flutter applications.
It supports image caching, blurhash placeholders, shimmer loading animations, and SVG color customization β€” all with minimal setup.

✨ Features #

  • 🧠 Smart Caching – Automatically caches network images and SVGs
  • 🌈 BlurHash Placeholders – Show a blurred preview while loading
  • ⚑ Shimmer Loading – Smooth skeleton loading animation
  • 🎨 SVG Support – Load and color SVGs from URLs
  • 🧩 Customizable Styles – Supports radius, borders, and shapes
  • ❌ Error Handling – Gracefully handle missing or broken images

βš™οΈ Installation #

Add cached_network_image_widget to your pubspec.yaml file:

dependencies:
  cached_network_image_widget: ^1.0.0

Then run:

```bash
flutter pub get

Import the package:

import 'package:cached_network_image_widget/cached_network_image_widget.dart';

πŸš€ Usage #

  1. Display a Cached Network Image
CachedNetworkImageWidget(
	'https://picsum.photos/400/300',
	height: 200,
	width: 300,
	borderRadius: BorderRadius.circular(12),
);
  1. Display a Cached SVG Image
CachedNetworkSvgWidget(
	'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/android.svg',
	height: 100,
	width: 100,
	color: Colors.green,
);
  1. With BlurHash and Error Handling
CachedNetworkImageWidget(
	'https://example.com/photo-BH_cE3gK-EVH_.jpg', // BlurHash in URL
	height: 250,
	width: double.infinity,
	shape: BoxShape.rectangle,
	border: Border.all(color: Colors.grey.shade300),
	errorBuilder: (context, url, error) => const Icon(Icons.broken_image),
);

πŸ”§ Parameters #

Parameter Type Description
imageUrl String Image URL to load
height double? Image height
width double? Image width
borderRadius BorderRadius? Rounded corners
border BoxBorder? Border style
fit BoxFit How the image fits (default: BoxFit.cover)
shape BoxShape Shape (rectangle or circle)
color Color? Tint color (for SVGs)
errorBuilder Widget Function(BuildContext, String, Object)? Custom error widget

πŸ“„ License #

πŸ§ͺ Example App

You can find a working demo inside the example/ folder.
Run it directly:

cd example
flutter run

πŸͺͺ License

This project is licensed under the MIT License.
Β© 2025 Safeen Kurd

πŸ‘€ Author

Safeen Kurd
πŸ“§ safeenkurd96@gmail.com
🌐 void.krd β€” safeenkurd.info

2
likes
130
points
53
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package providing advanced CachedNetworkImage and SVG image caching with BlurHash placeholders and shimmer effects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

cached_network_image, cached_network_svg_image, flutter, flutter_animate, flutter_blurhash, flutter_cache_manager

More

Packages that depend on cached_network_image_widget