cached_memory_image
1.5.0, released 3 years ago by inteniquetic.com
Cache Base64 or Uint8List images locally and display them with a widget or provider
What it does
It stores images encoded as Base64 or raw bytes in the device cache directory and serves them via a widget or ImageProvider. It also provides utilities to check existence, remove, clear and dispose cache entries.
AI-written summary of version 1.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display images that are only available as Base64 or byte arrays and want them cached locally
- You want a simple widget or provider that handles caching automatically without writing file I/O code
Skip it when
- You need to stream large images from a network source
- You require advanced image manipulation or decoding beyond simple caching
Strengths
- Easy to use widget/provider API
- Supports both Base64 and Uint8List inputs
- Built on flutter_cache_manager for reliable caching
- Provides utility methods for cache management
Weaknesses
- Limited to Base64/Uint8List, not network images
- No advanced image processing features
- No support for SVG or vector graphics
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add dependency in pubspec and import package
CachedMemoryImage(
uniqueKey: 'app://image/1',
base64: 'iVBORw0KGgoAAAANSUhEUgAA...',
)Alternatives
Packages that do the same job and could replace cached_memory_image.
- image_cropper
A Flutter plugin for Android, iOS and Web supports cropping images
84Compare - cached_network_image
Load and cache network images in Flutter with placeholder and error widget support.
91Compare - fc_native_image_resize
A Flutter plugin to resize images via native APIs.
69Compare - cached_network_image_ce
Community edition of cached network image using Hive for fast cache reads.
90Compare
Works with
Packages commonly used together with cached_memory_image: ones it builds on, ones built on it, and its own family.