custom_cached_image 1.9.0
custom_cached_image: ^1.9.0 copied to clipboard
A Flutter package for displaying cached network images with a shimmer loading effect.
Changelog #
All notable changes to the custom_cached_image package are documented in this file.
1.9.0 - 2026-07-10 #
Fixed #
- Fixed successfully loaded network images being hidden by the widget background.
- Fixed
DecorationPosition.foregroundpainting the background color over images, shimmer placeholders, and error widgets. - Fixed valid image URLs being rejected by unnecessary HTTP and HTTPS URL validation.
- Updated the widget to pass every non-empty image URL directly to
CachedNetworkImage. - Fixed profile images not displaying when using API values such as
tenant.profileImage. - Fixed image borders being rendered underneath loaded images.
- Fixed inconsistent clipping between images, placeholders, fallback widgets, and borders.
- Fixed stale image error states when
imageUrlorcacheKeychanged. - Fixed retry requests continuing to use a failed cached image.
- Fixed cache eviction not respecting a custom
cacheKey. - Fixed duplicate
onErrorcallbacks during widget rebuilds. - Fixed empty image URLs causing unnecessary network requests.
- Fixed minor image loading, caching, retry, and rendering issues.
Updated #
- Improved network image compatibility by removing restrictive URL parsing.
- Improved image frame rendering by keeping the background behind the image.
- Improved retry handling and cache refresh behavior.
- Improved profile image reliability.
- Improved border rendering for circular and rectangular images.
1.8.0 - 2026-07-10 #
Added #
-
Added
CachedImageLoadingStylewith support for:shimmerspinnernone
-
Added the
CustomCachedImage.circleconstructor for circular profile images and avatars. -
Added built-in retry support for failed network images.
-
Added
showRetryButtonto enable or disable the retry button. -
Added
onRetrycallback for detecting retry attempts. -
Added
onErrorcallback for logging image-loading errors. -
Added
onTapcallback for handling image taps. -
Added
placeholderWidgetfor displaying a fully customized loading widget. -
Added support for customizable shimmer colors through:
shimmerBaseColorshimmerHighlightColor
-
Added
backgroundColorfor loading and error states. -
Added
fallbackIconfor customizing the default error icon. -
Added
fallbackIconColorfor customizing fallback icon colors. -
Added optional image borders through the
borderparameter. -
Added image alignment support through the
alignmentparameter. -
Added optional Hero animation support through
heroTag. -
Added accessibility support through
semanticLabel. -
Added custom cache identification through the
cacheKeyparameter. -
Added manual memory-cache dimensions through:
memCacheWidthmemCacheHeight
-
Added automatic memory-cache optimization based on the widget dimensions and device pixel ratio.
-
Added
optimizeMemoryCacheto enable or disable automatic cache optimization. -
Added
useOldImageOnUrlChangeto retain the previous image while a new image is loading. -
Added configurable image fade durations through:
fadeInDurationfadeOutDuration
-
Added configurable image rendering quality through
filterQuality.
Updated #
-
Converted
CustomCachedImagefrom aStatelessWidgetto aStatefulWidgetto support retries and improved image-state handling. -
Improved handling of null, empty, malformed, and unsupported image URLs.
-
Improved cached image loading performance.
-
Improved memory usage by decoding images closer to their displayed dimensions.
-
Improved profile image fallback behavior.
-
Improved initials generation for single-word and multi-word names.
-
Improved initials sizing for both square and rectangular image containers.
-
Improved profile fallback colors using deterministic name-based color generation.
-
Improved image behavior when
imageUrlchanges. -
Improved clipping for rectangular and circular images.
-
Improved shimmer loading behavior.
-
Improved error reporting by preventing duplicate error callbacks.
-
Improved retry behavior by removing the failed cached image before reloading.
-
Improved accessibility for profile and standard network images.
-
Improved package example with multiple image-loading scenarios.
-
Updated the default non-profile fallback to use a local icon instead of loading another network image.
-
Updated the package documentation with examples for:
- Basic cached images
- Circular profile images
- Profile initials
- Shimmer loading
- Spinner loading
- Custom placeholders
- Custom error widgets
- Retry handling
- Hero animations
- Error callbacks
- Memory optimization
Fixed #
- Fixed empty image URLs being passed directly to
CachedNetworkImage. - Fixed malformed URLs causing unnecessary image requests.
- Fixed failed fallback images triggering an additional network request.
- Fixed duplicate fallback handling when
errorWidgetwas provided. - Fixed repeated error callbacks during widget rebuilds.
- Fixed stale error states when the image URL changed.
- Fixed retry attempts continuing to use a failed cached image.
- Fixed oversized decoded images consuming unnecessary memory.
- Fixed incorrect initials sizing for rectangular images.
- Fixed profile images displaying an unclear fallback when no name was provided.
- Fixed inconsistent border clipping between the image, placeholder, and error widget.
- Fixed minor layout and image-rendering issues.
1.7.0 - 2026-03-16 #
1.6.0 - 2026-02-25 #
1.5.0 - 2026-02-05 #
Added #
-
Added the
errorWidgetparameter to allow a custom fallback widget when an image fails to load. -
Added support for custom fallback widgets such as:
- Asset images
- SVG widgets
- Icons
- Any custom Flutter widget
-
Added the
nameparameter for generating profile initials. -
Added the
isProfileflag to distinguish profile images from standard images. -
Added
_InitialsFallbackfor displaying user initials with a generated background color. -
Added
_NotFoundWidgetas the default non-profile image fallback. -
Added
_ShimmerEffectas the default loading placeholder.
Updated #
-
Updated
CustomCachedImageto use the following fallback priority:- Display the provided
errorWidget. - Display profile initials when
isProfileistrue. - Display the default fallback image for standard images.
- Display the provided
-
Improved error-handling flexibility.
-
Improved profile image fallback behavior.
Fixed #
- Fixed image failures displaying an empty area.
- Fixed missing fallback behavior for profile images.
- Fixed minor image-loading and rendering issues.
1.4.0 - 2025-08-01 #
Added #
- Added the
nameparameter for generating profile initials. - Added the
isProfileflag for profile image fallback handling. - Added
_InitialsFallbackwith generated background colors. - Added
_NotFoundWidgetfor standard image failures. - Added
_ShimmerEffectas the default loading placeholder.
Updated #
-
Updated image failure handling to display:
- The provided
errorWidget. - User initials when
isProfileistrue. - The default placeholder image for standard images.
- The provided
-
Improved fallback behavior for profile and non-profile images.
-
Improved the shimmer placeholder implementation.
Fixed #
- Fixed missing fallback content when profile image loading failed.
- Fixed minor placeholder and image-clipping issues.
1.1.0 - 2025-05-12 #
Added #
- Added the
errorWidgetparameter toCustomCachedImage. - Added support for displaying custom fallback widgets when an image fails to load.
- Added support for using asset images, SVGs, icons, and other Flutter widgets as error placeholders.
Updated #
- Improved image-loading error handling.
- Improved customization options for failed images.
0.0.1 - 2025-01-01 #
Initial Release #
- Added the basic
CustomCachedImagewidget. - Added cached network image loading.
- Added a shimmer loading placeholder.
- Added customizable image height and width.
- Added customizable border radius.
- Added support for different
BoxFitoptions. - Added basic image error handling.