PackageTrack
Sign in Get early access

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 2026
Release Pre-release

Releases

latest 18
  1. 4.10.0 30 Jul 2026
    Release notes
    • Performance: DefaultCacheManager now 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 outlive dispose().
    • Behaviour change: An onResponse interceptor 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)

    Open source →
  2. 4.9.1 29 Jul 2026
    Release notes

    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.

    Open source →
    Release notes
    • Fix: Codec decode failures (e.g. JXL, or AVIF/HEIC on platforms without native support) now route to unsupportedImageBuilder instead of errorBuilder. Previously only pre-detected formats (SVG) were routed this way via UnsupportedImageFormatException; any other codec decode failure fell through as a generic, untyped error.
    Open source →
  3. 4.9.0 20 Jun 2026
    Release notes

    chore: bump version to 4.9.0 and update CHANGELOG

    Open source →
    Release notes
    • Feature: Added metadataDirectoryProvider to DefaultCacheManager so 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 DefaultCacheManager instances sharing a cacheDirectoryProvider but different metadataDirectoryProvider no longer delete each other's files. dispose() now awaits any in-flight sweep instead of racing it.
    Open source →
  4. 4.8.0 17 Jun 2026
    Release notes

    fix(cache): re-read fresh metadata in _touchEntry, final-class CacheE…

    Open source →
    Release notes
    • Feature: Added LRU cache cleanup support to DefaultCacheManager.
      • New CleanupStrategy abstraction controls eviction order when the cache exceeds maxNrOfCacheObjects.
      • TtlCleanupStrategy — evicts soonest-to-expire entries first. Matches prior behaviour and remains the default.
      • LruCleanupStrategy — evicts least-recently-used entries first, based on a new touchedAt timestamp updated on every cache hit.
      • CacheEntryMetadata gains a nullable touchedAt field; legacy entries without it fall back to validTill via effectiveTouchedAt.
      • Pass a strategy via the new cleanupStrategy parameter on DefaultCacheManager, or implement CleanupStrategy for a custom eviction policy.
    Open source →
  5. 4.7.0 10 Jun 2026
    Release notes

    chore: bump version to 4.7.0 and update CHANGELOG

    Open source →
    Release notes
    • 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 httpInterceptors and cacheInterceptors parameters on DefaultCacheManager.
      • CacheInterceptor and 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.
    Open source →
  6. 4.6.4 24 Mar 2026
    Release notes

    chore: update version to 4.6.4 and add changelog entry for Hive key s…

    Open source →
    Release notes
    • Fix: Resolve HiveError crashes 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.
    Open source →
  7. 4.6.3 15 Mar 2026
    Release notes

    chore: Update version numbers to 4.6.3 and 2.1.1 in pubspec.yaml and …

    Open source →
    Release notes
    • 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 PathNotFoundException on first use when the OS or test harness removes the temp directory between initialisation and the first cache put/get.
    • Added regression tests for cache-directory resilience and for safe disposal after emptyCache(). (PR #17)
    Open source →
  8. 4.6.2 04 Mar 2026
    Release notes

    fix: Update CHANGELOG for version 4.6.2, fixes Hive box corruption re…

    Open source →
    Release notes
    • Fix: Handle Hive box corruption gracefully during cache initialization.
      • When openBox encounters a corrupted box with unknown typeIds (e.g., from removed adapters), catch HiveError, 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.
    Open source →
  9. 4.6.1 04 Mar 2026
    Release notes
    • Fix: Re-export ConnectionParameters from the main cached_network_image_ce barrel file so it is accessible without a separate cached_network_image_platform_interface_ce import.
    • Fix: Added missing connectionParameters parameter to the stub DefaultCacheManager for unsupported platforms.
    • Added example demonstrating DefaultCacheManager with ConnectionParameters.
    Open source →
  10. 4.6.0 03 Mar 2026
    Release notes
    • Feature: Added optional HTTP timeout support via ConnectionParameters on DefaultCacheManager.
      • connectionTimeout limits time waiting for response headers.
      • requestTimeout applies an inactivity timeout while streaming response bytes.
      • Existing behavior is preserved when connectionParameters is not provided.
    • Added tests for timeout behavior and client cleanup on timeout.
    Open source →
  11. 4.5.0 02 Mar 2026
    Release notes
    • 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 DefaultCacheManager is now conditionally imported per platform (IO/web).
    Open source →
  12. 4.4.0 27 Feb 2026
    Release notes
    • Feature: Skip placeholder and fade animations when images are loaded from disk cache. Cached images now appear instantly without unnecessary visual flicker.
    • Added disablePlaceholderOnCacheHit parameter (default true) to opt out of this behavior.
    • CachedNetworkImage is now a StatefulWidget to support async cache pre-checking.
    Open source →
  13. 4.3.0 26 Feb 2026
    Release notes
    • Feature/Deprecation: Added errorBuilder to CachedNetworkImage and CachedImageWidget, which aligns with Flutter's standard ImageErrorWidgetBuilder. The old errorWidget property is now deprecated.
    • Fix: Resolved a memory leak where errorListener would prevent CachedNetworkImage from being garbage collected. Uses addEphemeralErrorListener on Flutter >= 3.16.
    Open source →
  14. 4.2.0 23 Feb 2026
    Release notes
    • Feature: Added SVG support via new unsupportedImageBuilder callback
      • New UnsupportedImageFormatException thrown when image format is not supported by Flutter's standard codec
      • New ImageFormatDetector utility 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
    Open source →
  15. 4.1.1 20 Feb 2026
    Release notes
    • Fix: Removed global Hive.init() usage from DefaultCacheManager to avoid conflicts with host app Hive initialization
    • Fix: Added initialization synchronization in DefaultCacheManager to 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 cacheDirectoryProvider parameter to DefaultCacheManager so apps can control cache storage location
    • Tests: Added regression tests for Hive init conflicts, concurrent initialization races, and cache directory resilience scenarios
    Open source →
  16. 4.1.0 20 Feb 2026
    Release notes
    • Feature: Added httpClientFactory parameter to DefaultCacheManager for HTTP client dependency injection, enabling easy mocking in tests
    • Refactor: Replaced raw Map<String, dynamic> with typed CacheEntryMetadata class 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.Client cleanup, file sink closure, ImageLoader chunkEvents, MultiImageStreamCompleter disposal, Hive box lifecycle (19 tests)
      • ImageLoader, CachedNetworkImageProvider, CacheEntryMetadata coverage
    • Fix: Resolved analyzer warnings across all packages
    Open source →
  17. 4.0.1 19 Feb 2026
    Release notes
    • Added repository field for pub.dev source code display
    • Updated README with benchmarks and architectural details
    • Updated dependencies to _ce suffixed packages
    Open source →
  18. 4.0.0 19 Feb 2026

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive