Replies: 1 comment
-
Have you checked the example app of the firebase_storage package? That one I got working on the web! It might be a good jumping off point. Because of the error in your code, I have deleted my work branch that you're depending on, so that's the likely culprit for your failure. The code that I merged to github is not present in pub.dev, so if you want the latest versions of the plugin, try to depend from git for both firebase_storage and firebase_storage_web. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Now I wasn't sure how to title this question because I am not sure where the issue is, I'm also new to flutter, dart, github kinda so I'm sure there is a lot of things I am doing wrong here. Nevertheless here is the story.
Intro
So yesterday I wanted to use firebase_storage for my new flutter web project. I quickly realized that the flutterfire package for firebase_storage doesn't work for web. After researching a little bit I came back here and all of a sudden there was a PR by @ditman that had been accepted to change that ( #3917).
Because I am impatient and I don't want to wait for the release I decided to add the dependency in my yaml directly from git. My first attempt didn't work
because of that:
A new branch
So I decided to add the dependency directly on the branch:
I didn't have any problems this far so I tried to test it with a simple "getList" request in the firebase storage. I will first post the error that I got and all the code that is relevant to the test to make sure I didn't forget anything. Also I should add that before running this I did a "flutter clean", "pub get" and "flutter build web", then started the webserver on chrome with "flutter run".
My Error:
my index.html:
(Here I'm not sure if I should add "firebase-storage.js" or if thats handled by the fireflutter package)
My firebase initialization (in main.dart)
(What I wondered here is do I have to configure that I use flutter web?)
My Storage getter (the test)
Thank you for your time and for helping me out 😄
Beta Was this translation helpful? Give feedback.
All reactions