AssetCache<T> class
Generic cache for loading assets of type T
given an AssetDecoder
- Inheritance
-
- Object
- GenericCache<
T> - AssetCache
- Implementers
Constructors
-
AssetCache({required AssetDecoder<
T> decoder, AssetBundle? assetBundle, String? basePath}) - Constructor for AssetCache with decoder and optional assetBundle and basePath
Properties
- assetBundle → AssetBundle?
-
Optional asset bundle
final
- basePath → String?
-
Optional base path so you don't have to type full path
finalinherited
-
decoder
→ AssetDecoder<
T> -
Decode asset bytes to type T
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
load(
String key) → Future< T> -
Load an asset from the cache or load it from the asset bundle and cache it
inherited
-
loadAsset(
String key) → Future< T> -
Load and decode an asset from a bundle given a
key
override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited