Skip to main content

flutter_network_image 0.2.0 copy "flutter_network_image: ^0.2.0" to clipboard
flutter_network_image: ^0.2.0 copied to clipboard

flutter package that provides an ImageProvider automatically retries failed network image loads, ensuring smooth image loading on mobile and web platforms.

0.2.0 #

Breaking changes #

  • Minimum SDK raised to Dart 3.0 / Flutter 3.10 (required by ImageProvider.loadImage).
  • Failed loads are now retried by default (3 attempts, no retry on permanent HTTP 4xx errors other than 408/429). Pass retryWhen: null to keep the old no-retry behavior.
  • NetworkImageProvider equality and hashCode now include headers, maxWidth and maxHeight, so providers differing in those are no longer treated as the same image by Flutter's image cache.
  • When the cache manager returns no file, the client throws NetworkImageEmptyResponseException instead of a fake 404 NetworkImageLoadException.

Added #

  • NetworkImageClient(cacheManager: ...) to customise disk caching (stale period, max objects, directory).
  • BaseNetworkImageClient and NetworkImageClient are now exported, so custom clients can be written.
  • Attempt.error and Attempt.stackTrace, so retryWhen can decide per error.
  • retryDelay and NetworkImageRetry.exponentialBackoff() (capped, optional jitter); retryAfter still works as a fixed delay.
  • NetworkImageRetry with defaultWhen, isPermanentError and exponentialBackoff() helpers.
  • NetworkImageProvider.evictFromDisk(), BaseNetworkImageClient.evict() and clearCache().

Fixed #

  • Retries threw "Cannot add event after closing" because the progress stream was closed before the retry ran.
  • Download progress events are no longer added to a closed stream.

0.1.0 #

  • Update network client

0.0.8 #

  • Fix attempt counter

0.0.7+1 #

  • Fix typo

0.0.7 #

  • Adds documentation
  • Update Example

0.0.6+1 #

  • Update README

0.0.6 #

  • Update README

0.0.5 #

  • Adds attempt data
  • Update example

0.0.4 #

  • Load image using flutter cache manager

0.0.3 #

  • Update retryWhen callback

0.0.2+1 #

  • Documentation

0.0.2 #

  • LoadingBuilder image

0.0.1 #

  • Initial release
10
likes
150
points
345
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

flutter package that provides an ImageProvider automatically retries failed network image loads, ensuring smooth image loading on mobile and web platforms.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_cache_manager

More

Packages that depend on flutter_network_image