An AssetBundle that permanently caches string and structured resources that have been fetched.
Strings (for loadString and loadStructuredData) are decoded as UTF-8. Data that is cached is cached for the lifetime of the asset bundle (typically the lifetime of the application).
Binary resources (from load) are not cached.
- Inheritance
- Object
- AssetBundle
- CachingAssetBundle
- Implemented by
Constructors
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
-
evict(
String key) → void -
If this is a caching asset bundle, and the given key describes a cached asset, then evict the asset from the cache so that the next time it is loaded, the cache will be reread from the asset bundle.
-
loadString(
String key, { bool cache: true }) → Future<String> -
Retrieve a string from the asset bundle.
-
loadStructuredData(
String key, Future parser(String value)) → Future -
Retrieve a string from the asset bundle, parse it with the given function, and return the function's result.
-
load(
String key) → Future<ByteData> -
Retrieve a binary resource from the asset bundle as a data stream.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited