Based on this page FlutterFire should support Firebase Cloud Storage on web. However, when I init FlutterFire and then run the following code I get an error:
import 'package:firebase_storage/firebase_storage.dart';
...
await store.ref().child(storePath).child(newId).putData(imageData,);
The error is:
Uncaught (in promise) Error: MissingPluginException(No implementation found for method Task#startPutData on channel plugins.flutter.io/firebase_storage)
at Object.throw_ [as throw] (errors.dart:216)
This is the setup I have in index.html:
<script src="https://www.gstatic.com/firebasejs/7.24.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.24.0/firebase-firestore.js"></script>>
<script src="https://www.gstatic.com/firebasejs/7.24.0/firebase-storage.js"></script>
<script>
var firebaseConfig = {
apiKey: "sdjsdlksksd", //random strings not actual values
authDomain: "sdsdkldskldsk",
databaseURL: "https://askjskdjkd.com",
projectId: "sdisdkjk",
storageBucket: "dklsjfkldsfjlkdsjk",
appId: "1:dghjqwkdwwqo;kewijdkjw",
};
firebase.initializeApp(firebaseConfig);
firebase.analytics();
And in pubspec.yaml:
firebase_storage: ^5.0.1
Any idea what might be causing the error? Is it really a bug? Any workaround?