hf_retry library Null safety

Utilities for loading images from the network.

This library expands the capabilities of the basic Image.network and NetworkImage provided by Flutter core libraries, to include a retry mechanism and connectivity detection.


Instructions NetworkImageWithRetry uses to fetch the image.
Builds a FetchStrategy function that retries up to a certain amount of times for up to a certain amount of time.
Fetches the image from the given URL, associating it with the given scale.


FetchStrategy = Future<FetchInstructions> Function(Uri uri, FetchFailure? failure)
This function is called to get FetchInstructions to fetch an image.
TransientHttpStatusCodePredicate = bool Function(int? statusCode)
Determines whether the given HTTP statusCode is transient.

Exceptions / Errors

Contains information about a failed attempt to fetch an image.