1
votes

When I try to get the download URL of a photo stored at Firebase Storage I get this error message in VS Code:

Exception has occurred. MissingPluginException (MissingPluginException(No implementation found for method StorageReference#getDownloadUrl on channel plugins.flutter.io/firebase_storage))

This is how I'm getting the download URL:

final String path = book['id'] + '/book-cover.jpg'; // this is just a mock for now
final StorageReference ref = FirebaseStorage.instance.ref().child(path);

ref.getDownloadURL()
  .then((value) => print('URL is:' + value));

I have the following imported in my dart file:

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:firebase_storage/firebase_storage.dart';

And this is my pubspec:

dependencies:
  flutter:
    sdk: flutter
  redux: ^3.0.0
  firebase_core: ^0.3.0
  cloud_firestore: ^0.9.0
  firebase_storage: ^2.0.0
1
I feel like this is happening because you haven't uploaded anything to the reference.dshukertjr
I have uploaded the file manually using Firebase console. Even if I hardcode the path I get the same error. Storage rules are set to public btw.Rafff
@Rafff how did you fixed? I have the same problem now.. thank youPetr Klein

1 Answers

0
votes

Probably you have to update your GoogleServices files.