AssetBytesLoader class

Loads vector graphics data from an asset bundle.

This loader does not cache bytes by default. The Flutter framework implementations of AssetBundle also do not typically cache binary data.

Callers that would benefit from caching should provide a custom AssetBundle that caches data, or should create their own implementation of an asset bytes loader.

Inheritance

Constructors

AssetBytesLoader(String assetName, {String? packageName, AssetBundle? assetBundle})
A loader that retrieves bytes from an AssetBundle.
const

Properties

assetBundle AssetBundle?
The asset bundle to use.
final
assetName String
The name of the asset to load.
final
hashCode int
The hash code for this object.
no setteroverride
packageName String?
The package name to load from, if any.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cacheKey(BuildContext? context) Object
Create an object that can be used to uniquely identify this asset and loader combination.
override
loadBytes(BuildContext? context) Future<ByteData>
Load the byte data for a vector graphic binary asset.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override