optimized_cached_image library

A flutter library for loading images from network, resizing and caching them for memory sensitivity. This resizes and stores the images in cache based on parent container constraints and hence loads images of lower size into memory. This is heavily inspired by cached_network_image library.

Classes

DownloadProgress
Progress of the file that is being downloaded from the originalUrl.
Logger
MultiImageStreamCompleter
An ImageStreamCompleter with support for loading multiple images.
OptimizedCacheImage
Image widget to show NetworkImage with caching functionality.
OptimizedCacheImageProvider
An ImageProvider to load images from the network with caching functionality.

Enums

ImageRenderMethodForWeb
Currently there are 2 different ways to show an image on the web with both their own pros and cons, using a custom HttpGet or an HTML Image element mentioned here on a GitHub issue.

Properties

timeDilation double
Slows down animations by this factor to help in development.
no setter

Functions

log(String message) → void

Typedefs

ErrorListener = void Function()
Function which is called after loading the image failed.
ImageWidgetBuilder = Widget Function(BuildContext context, ImageProvider<Object> imageProvider)
Builder function to create an image widget. The function is called after the ImageProvider completes the image loading.
LoadingErrorWidgetBuilder = Widget Function(BuildContext context, String url, dynamic error)
Builder function to create an error widget. This builder is called when the image failed loading, for example due to a 404 NotFound exception.
PlaceholderWidgetBuilder = Widget Function(BuildContext context, String url)
Builder function to create a placeholder widget. The function is called once while the ImageProvider is loading the image.
ProgressIndicatorBuilder = Widget Function(BuildContext context, String url, DownloadProgress progress)
Builder function to create a progress indicator widget. The function is called every time a chuck of the image is downloaded from the web, but at least once during image loading.