FirebaseStorageAdapter class
StorageAdapter for handling files in Firebase Storage.
download is not available on the Web platform.
The https://firebasestorage.googleapis.com/v0/b/storageBucket/o/remoteRelativePath?alt=media is available at fetchPublicURI.
Basically, the default FirebaseStorage.instance is used, but it is possible to use a specified authentication database by passing storage when creating the adapter.
You can initialize Firebase by passing options.
Firebase Storageでファイルを扱うためのStorageAdapter。
Webのプラットフォームではdownloadが利用できません。
fetchPublicURIでhttps://firebasestorage.googleapis.com/v0/b/storageBucket/o/remoteRelativePath?alt=mediaが利用可能です。
基本的にデフォルトのFirebaseStorage.instanceが利用されますが、アダプターの作成時にstorageを渡すことで指定された認証データベースを利用することが可能です。
optionsを渡すことでFirebaseの初期化を行うことができます。
- Inheritance
-
- Object
- StorageAdapter
- FirebaseStorageAdapter
- Annotations
Constructors
- FirebaseStorageAdapter({FirebaseOptions? options, FirebaseStorage? storage})
-
StorageAdapter for handling files in Firebase Storage.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → FirebaseOptions?
-
Options for initializing Firebase.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → FirebaseStorage
-
You can get an instance of Firebase Storage.
no setter
Methods
-
delete(
String relativePath) → Future< void> -
Delete files on the remote side in
relativePath.override -
download(
String remoteRelativePath, [String? localRelativePath]) → Future< LocalFile> -
Download the file on the remote side specified in
remoteRelativePathtolocalRelativePathon the local.override -
fetchDownloadURI(
String remoteRelativePath) → Future< Uri> -
Please make sure you can get the URI to download the file.
override
-
fetchPublicURI(
String remoteRelativePath) → 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
-
reference(
String path) → Reference -
You can get
Referenceof Firebase Storage by passingpath. -
toString(
) → String -
A string representation of this object.
inherited
-
upload(
String localFullPath, String remoteRelativePath) → Future< RemoteFile> -
Uploads the local file specified in
localFullPathtoremoteRelativePath, which is the location on the remote side.override -
uploadWithBytes(
Uint8List uploadFileByte, String remoteRelativePath) → Future< RemoteFile> -
Uploads the data specified in
uploadFileBytetoremoteRelativePath, which is the location on the remote side.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited