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が利用できません。

fetchPublicURIhttps://firebasestorage.googleapis.com/v0/b/storageBucket/o/remoteRelativePath?alt=mediaが利用可能です。

基本的にデフォルトのFirebaseStorage.instanceが利用されますが、アダプターの作成時にstorageを渡すことで指定された認証データベースを利用することが可能です。

optionsを渡すことでFirebaseの初期化を行うことができます。

Inheritance
Annotations

Constructors

FirebaseStorageAdapter({FirebaseOptions? options, FirebaseOptions? iosOptions, FirebaseOptions? androidOptions, FirebaseOptions? webOptions, FirebaseOptions? windowsOptions, FirebaseOptions? macosOptions, FirebaseOptions? linuxOptions, FirebaseStorage? storage})
StorageAdapter for handling files in Firebase Storage.
const

Properties

androidOptions → FirebaseOptions?
Options for initializing Firebase.
final
hashCode int
The hash code for this object.
no setteroverride
iosOptions → FirebaseOptions?
Options for initializing Firebase.
final
linuxOptions → FirebaseOptions?
Options for initializing Firebase.
final
macosOptions → FirebaseOptions?
Options for initializing Firebase.
final
options → FirebaseOptions?
Options for initializing Firebase.
no setter
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
webOptions → FirebaseOptions?
Options for initializing Firebase.
final
windowsOptions → FirebaseOptions?
Options for initializing Firebase.
final

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
reference(String path) → Reference
You can get Reference of Firebase Storage by passing path.
toString() String
A string representation of this object.
inherited
upload(String localFullPath, String remoteRelativePathOrId, {String? mimeType}) 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, {String? mimeType}) 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