Reference class

Represents a reference to a Google Cloud Storage object. Developers can upload, download, and delete objects, as well as get/set object metadata.

Properties

bucket String
The name of the bucket containing this reference's object.
no setter
fullPath String
The full path of this object.
no setter
hashCode int
The hash code for this object.
no setteroverride
name String
The short name of this object, which is the last component of the full path.
no setter
parent Reference?
A reference pointing to the parent location of this reference, or null if this reference is the root.
no setter
root Reference
A reference to the root of this reference's bucket.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage FirebaseStorage
The storage service associated with this reference.
final

Methods

child(String path) Reference
Returns a reference to a relative path from this reference.
delete() Future<void>
Deletes the object at this reference's location.
getData([int maxSize = 10485760]) Future<Uint8List?>
Asynchronously downloads the object at the StorageReference to a list in memory.
getDownloadURL() Future<String>
Fetches a long lived download URL for this object.
getMetadata() Future<FullMetadata>
Fetches metadata for the object at this location, if one exists.
list([ListOptions? options]) Future<ListResult>
List items (files) and prefixes (folders) under this storage reference.
listAll() Future<ListResult>
List all items (files) and prefixes (folders) under this storage reference.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putBlob(dynamic blob, [SettableMetadata? metadata]) UploadTask
Upload a Blob. Note; this is only supported on web platforms.
putData(Uint8List data, [SettableMetadata? metadata]) UploadTask
Uploads data to this reference's location.
putFile(File file, [SettableMetadata? metadata]) UploadTask
Upload a File from the filesystem. The file must exist.
putString(String data, {PutStringFormat format = PutStringFormat.raw, SettableMetadata? metadata}) UploadTask
Upload a String value as a storage object.
toString() String
A string representation of this object.
override
updateMetadata(SettableMetadata metadata) Future<FullMetadata>
Updates the metadata on a storage object.
writeToFile(File file) DownloadTask
Writes a remote storage object to the local filesystem.

Operators

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