Skip to main content

Cloud Storage

What does it do?#

Cloud Storage is designed to help you quickly and easily store and serve user-generated content, such as photos and videos.

Installation#

1. Add dependency#

Add the firebase_storage dependency to your projects pubspec.yaml file:

pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: "^0.7.0"
firebase_storage: "^7.0.0"

2. Download dependency#

$ flutter pub get

3. (Web Only) Add the SDK#

If using FlutterFire on the web, add the firebase-storage JavaScript SDK to your index.html file:

web/index.html
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-storage.js"></script>
</body>
</html>

4. Rebuild your app#

Once complete, rebuild your Flutter application:

$ flutter run

Next Steps#

Once installed, you're ready to start using Cloud Storage in your Flutter Project. View the Usage documentation to get started.