Firebase Cloud Storage for Flutter

pub package

A Flutter plugin to use the Firebase Cloud Storage API.

For Flutter plugins for other Firebase products, see


To use this plugin, add firebase_storage as a dependency in your pubspec.yaml file.


If you wish to see status events for your upload tasks in your logs, you should listen to the stream.
This could look like the following if you are using StorageReference.putData:

final StorageReference storageReference = FirebaseStorage().ref().child(path);

final StorageUploadTask uploadTask = storageReference.putData(data);

final StreamSubscription<StorageTaskEvent> streamSubscription = {
  // You can use this to notify yourself or your user in any kind of way.
  // For example: you could use the stream in a StreamBuilder instead
  // to show your user what the current status is. In that case, you would not need to cancel any
  // subscription as StreamBuilder handles this automatically.

  // Here, every StorageTaskEvent concerning the upload is printed to the logs.
  print('EVENT ${event.type}');

// Cancel your subscription when done.
await uploadTask.onComplete;

Getting Started

See the example directory for a complete sample app using Firebase Cloud Storage.

Issues and feedback

Please file FlutterFire specific issues, bugs, or feature requests in our issue tracker.

Plugin issues that are not specific to Flutterfire can be filed in the Flutter issue tracker.

To contribute a change to this plugin, please review our contribution guide and open a pull request.