safe_image 0.1.4 copy "safe_image: ^0.1.4" to clipboard
safe_image: ^0.1.4 copied to clipboard

Safe image loading from URL with native downsampling. Prevents OOM crashes and UI jank with streaming download, disk caching, and concurrency control.

0.1.4 #

  • Fix: handle "Communicating on a dead channel" after app goes to background.
  • NativeImageProcessor now catches MissingPluginException and wraps it in SafeImageException.
  • StreamImageDownloader now catches ClientException for dead HTTP connections.

0.1.3 #

  • Fix: invalidate old JPEG cache entries via cache key scheme version bump.
  • Optimistic check now prefers PNG cache over JPEG for transparent images.

0.1.2 #

  • Fix: stale JPEG cache no longer served for images with transparency.
  • Restructured pipeline: alpha detection now happens before all cache key generation.
  • Optimistic cache check now tries both JPEG and PNG variants.

0.1.1 #

  • Fix: images with alpha channel (PNG/WebP) no longer lose transparency.
  • Auto-detect alpha channel and encode as PNG instead of JPEG when transparency is present.
  • Added SafeImageFormat.png option.
  • Native code (Android/iOS) now respects the format parameter for PNG and WebP output.

0.1.0 #

  • Initial public release.
  • Streaming HTTP download with configurable timeouts and size limits.
  • Native image downsampling on Android and iOS via MethodChannel.
  • SHA-1 based disk caching with ETag support.
  • Concurrency control via configurable semaphores.
  • SafeImageWidget for drop-in image loading.
  • SafeImageScope for sharing a single pipeline across the widget tree.
  • Automatic retry with reduced resolution on OOM/decode errors.
0
likes
150
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Safe image loading from URL with native downsampling. Prevents OOM crashes and UI jank with streaming download, disk caching, and concurrency control.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

crypto, flutter, http, path, path_provider

More

Packages that depend on safe_image

Packages that implement safe_image