smart_image_x 1.0.2
smart_image_x: ^1.0.2 copied to clipboard
One widget that auto-detects any image source (network, asset, file, bytes, base64, SVG) with caching, BlurHash, zoom, galleries and transformations.
Changelog #
All notable changes to SmartImageX are documented here. The format is based on Keep a Changelog and the project adheres to Semantic Versioning.
1.0.2 #
- Meta: shorten the package description to satisfy pub.dev's 180-character limit (improves the pubspec.yaml pana score). No code changes.
1.0.1 #
- Docs: use absolute image URLs in the README so the screenshots render on pub.dev (relative paths are not resolved there). No code changes.
1.0.0 #
Initial release — "one image widget for everything".
Added #
SmartImagewidget with automatic source and format detection.- Source detection for network URLs, asset paths, file paths,
Uint8List,List<int>, base64 /data:URIs and inline SVG markup. - Format detection by magic bytes (PNG, JPEG, WebP, GIF, SVG, AVIF, BMP) with MIME and extension fallbacks.
- Two-tier cache (in-memory LRU + persistent disk) with
CachePolicystrategies, TTL-based expiry, size-bounded eviction and analytics. - Opportunistic disk-cache compression — entries are gzipped only when it
actually shrinks them (a real win for SVG/text, a no-op for raster), toggled
via
CacheConfig.compressDiskEntries. - Static cache API:
clearCache,clearMemoryCache,clearDiskCache,cleanupCache,preload,preloadAll,cacheStats,getMetadata. - Network layer with streamed byte-level progress, a priority queue and a global concurrency cap.
- Retry engine with exponential backoff, jitter and retryability rules.
- Fallback chain: primary → fallback image → fallback icon → error widget.
- Loaders: circular (determinate), shimmer, skeleton, and custom builders.
- BlurHash placeholder support via a native, dependency-free decoder.
- Progressive loading via a
thumbnailsource. - Zoom: inline pinch / double-tap / pan, plus a full-screen viewer.
SmartImageGallery: swipeable, zoomable, hero-animated gallery.- Adaptive quality that downscales decode resolution on slow connections.
- Image utilities (
SmartImageTools): compress, resize, crop, convert, rotate, flip, and colour transforms — all off the UI thread. - Accessibility: semantic labels and image semantics.
- Theming: light/dark-aware placeholders and error states.
- Security: optional
allowedDomainswhitelist (global and per-widget). - Eight lifecycle callbacks:
onLoadStart,onLoadSuccess,onLoadError,onRetry,onFallback,onCacheHit,onCacheMiss,onProgress.
Known limitations #
- WebP encoding is unavailable in the pure-Dart codec (decoding works);
CompressionFormat.webpthrows a descriptive error. Use JPEG or PNG. - AVIF rendering depends on host-platform codec support.
