Class for the imageCache object.
Implements a least-recently-used cache of up to 1000 images. The maximum size can be adjusted using maximumSize. Images that are actively in use (i.e. to which the application is holding references, either via ImageStream objects, ImageStreamCompleter objects, ImageInfo objects, or raw dart:ui.Image objects) may get evicted from the cache (and thus need to be refetched from the network if they are referenced in the putIfAbsent method), but the raw bits are kept in memory for as long as the application is using them.
The putIfAbsent method is the main entry-point to the cache API. It returns the previously cached ImageStreamCompleter for the given key, if available; if not, it calls the given callback to obtain it first. In either case, the key is moved to the "most recently used" position.
Generally this class is not used directly. The ImageProvider class and its subclasses automatically handle the caching of images.
) → void
- Evicts all entries from the cache. [...]
Object key, ImageStreamCompleter loader()) → ImageStreamCompleter
- Returns the previously cached ImageStream for the given key, if available; if not, calls the given callback to obtain it first. In either case, the key is moved to the "most recently used" position. [...]
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
) → String
Returns a string representation of this object.