InMemoryAssetReader class

An implementation of AssetReader with primed in-memory assets.

Inheritance
Implemented types

Constructors

InMemoryAssetReader({Map<AssetId, dynamic> sourceAssets, String rootPackage })
Create a new asset reader that contains sourceAssets. [...]
InMemoryAssetReader.shareAssetCache(Map<AssetId, List<int>> assets, { String rootPackage })
Create a new asset reader backed by assets.

Properties

assets → Map<AssetId, List<int>>
final
assetsRead → Set<AssetId>
final
rootPackage → String
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

cacheBytesAsset(AssetId id, List<int> bytes) → void
cacheStringAsset(AssetId id, String contents, { Encoding encoding }) → void
canRead(AssetId id) → Future<bool>
Indicates whether asset at id is readable.
override
findAssets(Glob glob, { String package }) → Stream<AssetId>
Returns all readable assets matching glob under the current package.
override
readAsBytes(AssetId id) → Future<List<int>>
Returns a Future that completes with the bytes of a binary asset. [...]
override
readAsString(AssetId id, { Encoding encoding: utf8 }) → Future<String>
Returns a Future that completes with the contents of a text asset. [...]
override
digest(AssetId id) → Future<Digest>
Returns a Digest representing a hash of the contents of id. [...]
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

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited