A subclass of ImageProvider that knows about AssetBundles.

This factors out the common logic of AssetBundle-based ImageProvider classes, simplifying what subclasses must implement to just obtainKey.

Inheritance
Implemented by

Constructors

AssetBundleImageProvider()

Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.

const

Properties

hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

decodeImage(ByteData data) Future<Image>

Converts raw image data from a ByteData buffer into a decoded ui.Image which can be passed to a Canvas.

load(AssetBundleImageKey key) ImageStreamCompleter

Converts a key into an ImageStreamCompleter, and begins fetching the image using loadAsync.

loadAsync(AssetBundleImageKey key) Future<ImageInfo>

Fetches the image from the asset bundle, decodes it, and returns a corresponding ImageInfo object.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
obtainKey(ImageConfiguration configuration) Future<AssetBundleImageKey>

Converts an ImageProvider's settings plus an ImageConfiguration to a key that describes the precise image to load.

inherited
resolve(ImageConfiguration configuration) ImageStream

Resolves this image provider using the given configuration, returning an ImageStream.

inherited
toString() String

Returns a string representation of this object.

inherited