MemoryStorageAdapter class

In-memory storage adapter implementing BundleStoragePort.

Stores bundles and assets in memory maps. Supports change notifications via stream.

Implemented types

Constructors

MemoryStorageAdapter()
Create a memory storage adapter.

Properties

assetUris List<String>
Get all stored asset URIs.
no setter
bundleUris List<String>
Get all stored bundle URIs.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all stored data.
delete(Uri uri) Future<void>
Delete bundle or asset.
override
dispose() → void
Dispose the adapter and close streams.
exists(Uri uri) Future<bool>
Check if bundle or asset exists.
override
list(Uri directoryUri) Future<List<Uri>>
List bundles in directory.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAsset(Uri uri) Future<Uint8List>
Read asset binary data.
override
readBundle(Uri uri) Future<Map<String, dynamic>>
Read bundle JSON from URI.
override
seed(String uriString, Map<String, dynamic> bundle) → void
Seed with bundle data for testing.
seedAsset(String uriString, Uint8List data) → void
Seed with asset data for testing.
toString() String
A string representation of this object.
inherited
watch(Uri uri) Stream<BundleChangeEvent>?
Watch for changes (optional).
override
writeAsset(Uri uri, Uint8List data) Future<void>
Write asset binary data.
override
writeBundle(Uri uri, Map<String, dynamic> data) Future<void>
Write bundle JSON to URI.
override

Operators

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