RuntimeStorageAdapter class

StorageAdapter for handling files at runtime.

Only available for file uploads and downloads.

It is not possible to issue URLs, etc. for displaying images.

MemoryStorage] can be used in the test by passing MemoryStorage to storage.

You can specify a list of data to be initially retained in rawData.

ランタイム上でファイルを扱うためのStorageAdapter

ファイルのアップロードとダウンロードでのみ利用可能です。

画像の表示用のURL等を発行することはできません。

storageMemoryStorageを渡すことでテストで利用することができます。

rawDataに最初に保持しておくデータのリストを指定することができます。

Inheritance
Available Extensions

Constructors

RuntimeStorageAdapter({MemoryStorage? storage, Map<String, Uint8List> rawData = const {}})
StorageAdapter for handling files at runtime.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
rawData Map<String, Uint8List>
List of data to be retained initially.
final
remoteStorage MemoryStorage
Designated remote storage.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String remoteRelativePathOrId) Future<void>
Delete files on the remote side in remoteRelativePathOrId.
override
download(String remoteRelativePathOrId, [String? localRelativePath]) Future<LocalFile>
Download the file on the remote side specified in remoteRelativePathOrId to localRelativePath on the local.
override
fetchDownloadURI(String remoteRelativePathOrId) Future<Uri>
Please make sure you can get the URI to download the file.
override
fetchPublicURI(String remoteRelativePathOrId) Future<Uri>
Please make sure that you can get a publicly available URL. Use this URI when you want to retrieve images, etc. using Image.network, etc.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upload(String localFullPath, String remoteRelativePathOrId) Future<RemoteFile>
Uploads the local file specified in localFullPath to remoteRelativePathOrId, which is the location on the remote side.
override
uploadWithBytes(Uint8List uploadFileByte, String remoteRelativePathOrId) Future<RemoteFile>
Uploads the data specified in uploadFileByte to remoteRelativePathOrId, which is the location on the remote side.
override

Operators

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

Static Properties

localStorage MemoryStorage
Local Storage.
final
sharedRemoteStorage MemoryStorage
Common remote storage throughout the app.
final