duytq94 / flutter-chat-demo

The chat app made by Flutter and Firebase
MIT License
1.76k stars 676 forks source link

firebase storage issues #50

Closed AtulSisodiya closed 3 years ago

AtulSisodiya commented 3 years ago

Screenshot 2021-02-06 145647

error related to firebase storage

huzzi commented 3 years ago

Change the 4 lines to

`
Reference reference = FirebaseStorage.instance.ref().child(fileName);

UploadTask uploadTask = reference.putFile(image);

TaskSnapshot storageTaskSnapshot = await uploadTask;

imageUrl = await storageTaskSnapshot.ref.getDownloadURL();`
duytq94 commented 3 years ago

Maybe you changed version firebase so the syntax changed too, read the firebase docs to update these code or get the same version as my demo

Screen Shot 2021-02-17 at 3 28 05 PM