I would like do display images stored on Firbase storage in my Flutter app but I'm dealing with this problem. I followed the instructions on this answer but my ref()
always comes like this:
I created this method only to test, and when I try get the DownloadURL the flutter throws a exception:
/flutter ( 4664): ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════ I/flutter ( 4664): The following ArgumentError was thrown resolving an image codec: I/flutter ( 4664): Invalid argument(s): No host specified in URI file:///Instance%20of%20'Future'
void _locateFile() async{
final ref = FirebaseStorage.instance
.ref()
.child('avatars')
.child('simples')
.child('woman1.png');
var url = Uri.parse(await ref.getDownloadURL() as String);
print(url);
}
}
Here is the image info:
So, if someone can help me, I'll be very happy :)