My question is pretty much the same as this: Displaying text from a text-file on Firebase storage
Only I want to do it in flutter and I have tried so many things. So basically I created a futurebuilder
, future
is the getDownloadUrl
. Up to this point, it's okay.
So moving on.
First, I tried nesting another FutureBuilder
, where future
is an http
request to the url. The future
does not have any data. I had my shiny little red box all the time, from the else clause of if(snapshot.hasData()){....}else{my redbox}
.
Then I tried a stateful widget where I have the text as loading...
and in the then()
clause of the get
request I called setState
with updating the text to the response body. It also doesn't have any data.
The link is for sure 100% correct, tried it in python, in browser and the best part.... Tried it in a separate dart file. It printed the correct data. Then I imported it in my flutter
app, called the function, and nothing happens. I just don't get it. Sorry for the messy question but I'm starting to give up. I like challenges in programming, but only if it has a reason to go bad and i can find that reason.