crash_safe_image 0.3.0 copy "crash_safe_image: ^0.3.0" to clipboard
crash_safe_image: ^0.3.0 copied to clipboard

Crash-safe Flutter image widget with network, asset, file, memory & SVG support. Smart caching, placeholders, error UI, and safe ImageProvider.

0.3.0 2025-01-XX #

Phase 1 Release - Advanced Features

New Features #

  • Progressive Loading: Show thumbnail first, then load full image with thumbnailUrl and useProgressiveLoading parameters
  • Image Transformations: Resize and crop operations with ImageTransformation.resize() and ImageTransformation.crop()
  • Enhanced Caching: Configurable cache with 4 presets (default, aggressive, conservative, minimal) via CrashSafeImageCacheConfig
    • Global cache configuration with CrashSafeImageCache.configure()
    • Per-widget cache configuration with cacheConfig parameter
    • Cache management: clear(), remove(), getStats()
  • Hero Animations: Smooth page transitions with heroTag parameter

Improvements #

  • Fixed SVG detection false positives (e.g., image.svg.png)
  • Replaced synchronous file operations with async-safe alternatives
  • Added path traversal protection for file paths
  • Enhanced network URI validation
  • Improved type casting safety
  • Better error handling in build method

Testing #

  • Added 25 new tests (32 total)
  • Tests for progressive loading, transformations, caching, and hero animations
  • Improved test coverage for edge cases

Dependencies #

  • Uses flutter_cache_manager via cached_network_image transitive dependency (no explicit declaration needed)

0.2.1 - 2025-09-14 #

  • Fixed: provider could return null in some cases.
    Now always returns a safe transparent fallback image (never-null).
  • Improved: safer behavior in CircleAvatar / DecorationImage usage, no user-side null checks needed.

0.2.0 - 2025-09-11 #

  • Added SVG support via flutter_svg.
  • Auto-detects .svg in network, asset, file, and memory sources.
  • Provides new factory: CrashSafeImage.svgString('<svg ...>').
  • Unified placeholder/error behavior for raster & SVG.

0.1.0 - 2025-08-31 #

  • Initial public release.
  • CrashSafeImage widget with network / asset / file / memory support.
  • Custom placeholder & error builders.
  • Cached network images via cached_network_image.
  • Example app and basic widget tests.
2
likes
160
points
178
downloads

Documentation

API reference

Publisher

verified publisherdevsloom.ca

Weekly Downloads

Crash-safe Flutter image widget with network, asset, file, memory & SVG support. Smart caching, placeholders, error UI, and safe ImageProvider.

Repository (GitHub)
View/report issues

Topics

#images #svg #widget #caching #utility

License

MIT (license)

Dependencies

cached_network_image, flutter, flutter_cache_manager, flutter_svg

More

Packages that depend on crash_safe_image