- protected
Fetches the image from the asset bundle, decodes it, and returns a corresponding ImageInfo object.
This function is used by load.
Source
@protected
Future<ImageInfo> loadAsync(AssetBundleImageKey key) async {
final ByteData data = await key.bundle.load(key.name);
if (data == null)
throw 'Unable to read data';
final ui.Image image = await decodeImage(data);
if (image == null)
throw 'Unable to decode image data';
return new ImageInfo(image: image, scale: key.scale);
}