Skip to main content

smart_image_x 1.0.2 copy "smart_image_x: ^1.0.2" to clipboard
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 #

  • SmartImage widget 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 CachePolicy strategies, 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 thumbnail source.
  • 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 allowedDomains whitelist (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.webp throws a descriptive error. Use JPEG or PNG.
  • AVIF rendering depends on host-platform codec support.
9
likes
160
points
42
downloads
screenshot

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

One widget that auto-detects any image source (network, asset, file, bytes, base64, SVG) with caching, BlurHash, zoom, galleries and transformations.

Repository (GitHub)
View/report issues

Topics

#image #cache #svg #blurhash #widget

License

MIT (license)

Dependencies

connectivity_plus, crypto, flutter, flutter_svg, http, image, path_provider

More

Packages that depend on smart_image_x