LocalStorage class abstract interface attachments

An interface responsible for storing attachment data locally.

This interface is only responsible for storing attachment content, essentially acting as a key-value store of virtual paths to blobs.

On native platforms, you can use the IOLocalStorage implemention. On the web, no default implementation is available at the moment.

Implementers
Annotations
  • @experimental

Constructors

LocalStorage.inMemory()
Returns an in-memory LocalStorage implementation, suitable for testing.
factory

Properties

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() Future<void>
Clears all data from the storage.
deleteFile(String filePath) Future<void>
Deletes a file at the specified path
fileExists(String filePath) Future<bool>
Checks if a file exists at the specified path
initialize() Future<void>
Initializes the storage, performing any necessary setup.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readFile(String filePath) Stream<Uint8List>
Retrieves binary data stream from storage at the specified file path
saveFile(String filePath, Stream<List<int>> data) Future<int>
Saves binary data stream to storage at the specified file path
toString() String
A string representation of this object.
inherited

Operators

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