Storage class
Provides access to file storage.
Pass storageQuery to set the path and adapter on the remote storage side.
Specify the local path in upload and upload the file. It is also possible to upload with real data instead of paths by using uploadWithBytes.
Uploaded files can be downloaded at download. In that case, cache the file by specifying the local cache path.
You can delete files on the remote side with delete.
ファイルストレージへのアクセス機能を提供します。
storageQueryを渡してリモートストレージ側のパスやアダプターの設定を行ってください。
uploadでローカルのパスを指定しファイルのアップロードを行います。 uploadWithBytesでパスではなく実データでアップロードすることも可能です。
アップロード済みのファイルをdownloadにてダウンロードすることが可能です。 その場合、ローカルのキャッシュのパスを指定してファイルをキャッシュします。
deleteでリモート側のファイルを削除することが可能です。
- Inheritance
-
- Object
- ChangeNotifier
- Storage
- Implemented types
- Available Extensions
Constructors
- Storage(StorageQuery storageQuery)
- Provides access to file storage.
Properties
-
deleting
→ Future<
void> ? -
You can wait for the file to be deleted.
no setter
-
downloading
→ Future<
void> ? -
If a file is being downloaded, you can wait.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storageQuery → StorageQuery
-
Information about the target files on the storage side is defined.
final
-
uploading
→ Future<
void> ? -
You can wait for the file to be uploaded.
no setter
- value → StorageValue?
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setteroverride
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
delete(
) → Future< void> - Deletes the file on the remote side specified by storageQuery.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
download(
[String? localRelativePath]) → Future< StorageValue?> -
Download the file on the remote side specified by storageQuery to
localRelativePath
on the local side. -
fetchDownloadURI(
) → Future< Uri> - Get the URI to download the file.
-
fetchPublicURI(
) → Future< Uri> -
Get a URL that can be made public. Use this URI when you want to retrieve images, etc. using
Image.network
, etc. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upload(
String localFullPath) → Future< StorageValue?> -
Uploads a file located at
localFullPath
on the local to the remote location specified by storageQuery. -
uploadWithBytes(
Uint8List uploadFileByte) → Future< StorageValue?> -
Uploads a file with the actual data in
uploadFileByte
to the location on the remote side specified by storageQuery.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited