cached_network_image_ce
Community Edition Flutter library to load and cache network images. Can also be used with placeholder and error widgets.
4.10.0
52K downloads/mo
#1451 most downloaded on pub.dev
Erengun/flutter_cached_network_image_ce
What this package is like to depend on
Last release 24 days ago
30 Jul 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 17 of 18 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
18 releases · first in 2026
18 releases in the last 12 months
see the full history below
Release timeline
18 releases · Feb 2026 to Jul 2026Releases
latest 18-
4.10.030 Jul 2026Release notes
Open source →- Performance:
DefaultCacheManagernow reuses a single HTTP client across downloads instead of creating and closing one per request, so connections can be kept alive between images. - Fix: A connection timeout now aborts the in-flight request instead of leaving it running in the background.
- Fix:
dispose()closes the reused client. Downloads started after disposal create their own client, which is closed once its last response is released. - Behaviour change:
dispose()called while a download is in flight now aborts that download; previously each download owned its client and could outlivedispose(). - Behaviour change: An
onResponseinterceptor that replaces the response must not derive the replacement body from the original response's stream — the original body is now canceled as soon as it is replaced, to release its connection.
contributed by @Chlx42 — thanks! (PR #58)
- Performance:
-
4.9.129 Jul 2026Release notes
Open source →The default HtmlImage web render method decodes through the browser's
native pipeline and never has raw bytes available, so decode failures
there never surface as UnsupportedImageFormatException. Clarify this in
the field doc and README so the mechanism isn't overclaimed as working
on Web unconditionally.Release notes
Open source →- Fix: Codec decode failures (e.g. JXL, or AVIF/HEIC on platforms without native support) now route to
unsupportedImageBuilderinstead oferrorBuilder. Previously only pre-detected formats (SVG) were routed this way viaUnsupportedImageFormatException; any other codec decode failure fell through as a generic, untyped error.
- Fix: Codec decode failures (e.g. JXL, or AVIF/HEIC on platforms without native support) now route to
-
4.9.020 Jun 2026Release notes
Open source →- Feature: Added
metadataDirectoryProvidertoDefaultCacheManagerso Hive metadata can be stored separately from cached image files on IO platforms. - Fix: Isolate the orphan-file cleanup sweep per metadata directory, so two
DefaultCacheManagerinstances sharing acacheDirectoryProviderbut differentmetadataDirectoryProviderno longer delete each other's files.dispose()now awaits any in-flight sweep instead of racing it.
- Feature: Added
-
4.8.017 Jun 2026Release notes
Open source →- Feature: Added LRU cache cleanup support to
DefaultCacheManager.- New
CleanupStrategyabstraction controls eviction order when the cache exceedsmaxNrOfCacheObjects. TtlCleanupStrategy— evicts soonest-to-expire entries first. Matches prior behaviour and remains the default.LruCleanupStrategy— evicts least-recently-used entries first, based on a newtouchedAttimestamp updated on every cache hit.CacheEntryMetadatagains a nullabletouchedAtfield; legacy entries without it fall back tovalidTillviaeffectiveTouchedAt.- Pass a strategy via the new
cleanupStrategyparameter onDefaultCacheManager, or implementCleanupStrategyfor a custom eviction policy.
- New
- Feature: Added LRU cache cleanup support to
-
4.7.010 Jun 2026Release notes
Open source →- Feature: Added HTTP and cache interceptor support to
DefaultCacheManager.HttpInterceptor— intercept, mutate, or short-circuit HTTP requests, responses, and errors before they reach the cache layer.CacheInterceptor— intercept cache hit, miss, and store events. Reject a hit to force re-download; resolve a miss to inject a synthetic file; reject a store to skip writing metadata to Hive.- Pass interceptors via the new
httpInterceptorsandcacheInterceptorsparameters onDefaultCacheManager. CacheInterceptorand its handler types are only available on native IO targets; a no-op stub is exported for web.- Full test coverage for all interceptor chain paths.
- Feature: Added HTTP and cache interceptor support to
-
4.6.424 Mar 2026Release notes
Open source →- Fix: Resolve
HiveErrorcrashes caused by URL string keys exceeding 255 characters. Long cache keys are now automatically hashed using SHA-256 to remain under Hive's 255-character length limit.
- Fix: Resolve
-
4.6.315 Mar 2026Release notes
Open source →- Fix: Handle exceptions when closing the Hive cache box and Hive instance during
dispose(). (PR #17)PathNotFoundException(e.g. when the cache directory was deleted before dispose) is now silently swallowed so callers can dispose without wrapping in try-catch.
- Feat: Ensure the cache directory exists before any file read/write operation. (PR #17)
- Prevents
PathNotFoundExceptionon first use when the OS or test harness removes the temp directory between initialisation and the first cache put/get.
- Prevents
- Added regression tests for cache-directory resilience and for safe disposal after
emptyCache(). (PR #17)
- Fix: Handle exceptions when closing the Hive cache box and Hive instance during
-
4.6.204 Mar 2026Release notes
Open source →- Fix: Handle Hive box corruption gracefully during cache initialization.
- When
openBoxencounters a corrupted box with unknown typeIds (e.g., from removed adapters), catchHiveError, safely delete the box, and retry initialization. - Cleans up orphaned cache files after box recovery to prevent stale data.
- Regression tests added for box corruption recovery on both IO and web platforms.
- Issue #12: Fixes production crash "HiveError: Cannot read, unknown typeId" reported via Firebase Crashlytics.
- When
- Fix: Handle Hive box corruption gracefully during cache initialization.
-
4.6.104 Mar 2026Release notes
Open source →- Fix: Re-export
ConnectionParametersfrom the maincached_network_image_cebarrel file so it is accessible without a separatecached_network_image_platform_interface_ceimport. - Fix: Added missing
connectionParametersparameter to the stubDefaultCacheManagerfor unsupported platforms. - Added example demonstrating
DefaultCacheManagerwithConnectionParameters.
- Fix: Re-export
-
4.6.003 Mar 2026Release notes
Open source →- Feature: Added optional HTTP timeout support via
ConnectionParametersonDefaultCacheManager.connectionTimeoutlimits time waiting for response headers.requestTimeoutapplies an inactivity timeout while streaming response bytes.- Existing behavior is preserved when
connectionParametersis not provided.
- Added tests for timeout behavior and client cleanup on timeout.
- Feature: Added optional HTTP timeout support via
-
4.5.002 Mar 2026Release notes
Open source →- Feature: Added web platform support. The package can now be used in Flutter web apps.
- Web caching uses Hive CE backed by IndexedDB — no new dependencies needed.
- Image bytes and metadata are stored in Hive boxes on web instead of the file system.
- Disk-based image resizing is skipped on web (originals are cached as-is).
- The
DefaultCacheManageris now conditionally imported per platform (IO/web).
- Feature: Added web platform support. The package can now be used in Flutter web apps.
-
4.4.027 Feb 2026Release notes
Open source →- Feature: Skip placeholder and fade animations when images are loaded from disk cache. Cached images now appear instantly without unnecessary visual flicker.
- Added
disablePlaceholderOnCacheHitparameter (defaulttrue) to opt out of this behavior. CachedNetworkImageis now aStatefulWidgetto support async cache pre-checking.
-
4.3.026 Feb 2026Release notes
Open source →- Feature/Deprecation: Added
errorBuildertoCachedNetworkImageandCachedImageWidget, which aligns with Flutter's standardImageErrorWidgetBuilder. The olderrorWidgetproperty is now deprecated. - Fix: Resolved a memory leak where
errorListenerwould preventCachedNetworkImagefrom being garbage collected. UsesaddEphemeralErrorListeneron Flutter >= 3.16.
- Feature/Deprecation: Added
-
4.2.023 Feb 2026Release notes
Open source →- Feature: Added SVG support via new
unsupportedImageBuildercallback- New
UnsupportedImageFormatExceptionthrown when image format is not supported by Flutter's standard codec - New
ImageFormatDetectorutility with content sniffing for SVG detection - Images are still cached normally; only rendering path differs
- Example app updated with SVG demo using
flutter_svg - 24 new tests added (18 format detection + 6 widget integration)
- See README for usage example
- New
- Feature: Added SVG support via new
-
4.1.120 Feb 2026Release notes
Open source →- Fix: Removed global
Hive.init()usage fromDefaultCacheManagerto avoid conflicts with host app Hive initialization - Fix: Added initialization synchronization in
DefaultCacheManagerto prevent parallel cold-start race conditions - Fix: Switched cache metadata box opening to explicit
openBox(path: ...)on a private Hive instance for reliable isolation - Feature: Added optional
cacheDirectoryProviderparameter toDefaultCacheManagerso apps can control cache storage location - Tests: Added regression tests for Hive init conflicts, concurrent initialization races, and cache directory resilience scenarios
- Fix: Removed global
-
4.1.020 Feb 2026Release notes
Open source →- Feature: Added
httpClientFactoryparameter toDefaultCacheManagerfor HTTP client dependency injection, enabling easy mocking in tests - Refactor: Replaced raw
Map<String, dynamic>with typedCacheEntryMetadataclass for all cache metadata operations - Tests: Comprehensive test coverage (131 tests, 86% coverage)
DefaultCacheManager: HTTP download success/errors, progress reporting, header forwarding, cache hit/miss/stale behavior, cleanup logic (31 tests)- Leak tests: StreamController closure,
http.Clientcleanup, file sink closure,ImageLoaderchunkEvents,MultiImageStreamCompleterdisposal, Hive box lifecycle (19 tests) ImageLoader,CachedNetworkImageProvider,CacheEntryMetadatacoverage
- Fix: Resolved analyzer warnings across all packages
- Feature: Added
-
4.0.119 Feb 2026Release notes
Open source →- Added
repositoryfield for pub.dev source code display - Updated README with benchmarks and architectural details
- Updated dependencies to
_cesuffixed packages
- Added
-
4.0.019 Feb 2026Nothing published for this version