LocalAssetBundle class

The dart:io-free stand-in for LocalAssetBundle.

Live reloading needs a filesystem to watch, so on the web this is a plain pass-through to delegate: start reports false and nothing is ever reloaded. It exists so installing a local bundle compiles everywhere.

Inheritance

Constructors

LocalAssetBundle({String? root, AssetBundle? delegate})

Properties

delegate AssetBundle
Where every key is loaded from.
final
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Whether live reloading is currently active. Always false here.
no setter
root String
The project directory asset keys would be resolved against.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
watching Iterable<String>
The manifest entries being watched. Always empty here.
no setter

Methods

clear() → void
If this is a caching asset bundle, clear all cached data.
inherited
dispose() Future<void>
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.
inherited
load(String key) Future<ByteData>
Retrieve a binary resource from the asset bundle as a data stream.
override
loadBuffer(String key) Future<ImmutableBuffer>
Retrieve a binary resource from the asset bundle as an immutable buffer.
inherited
loadString(String key, {bool cache = true}) Future<String>
Retrieve a string from the asset bundle.
inherited
loadStructuredBinaryData<T>(String key, FutureOr<T> parser(ByteData data)) Future<T>
Retrieve bytedata from the asset bundle, parse it with the given function, and return the function's result.
inherited
loadStructuredData<T>(String key, Future<T> parser(String value)) Future<T>
Retrieve a string from the asset bundle, parse it with the given function, and return the function's result.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<bool>
Does nothing, and reports that live reloading did not start.
stop() Future<void>
toString() String
A string representation of this object.
inherited

Operators

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