I\'m trying to build my first mobile application with flutter and firebase. When I try to display and store a photo I have the following issue :
error: T
ref.put
asks for a File
as parameter. What you are passing is a Future
.
You need to wait for the result of that future to make your call.
You can change your code to
final StorageUploadTask uploadTask = ref.put(await _imageFile);
final Uri downloadUrl = (await uploadTask.future).downloadUrl;
Or change _imageFile
to File
instead of Future