1

My Flutter app was working yesterday and today it is not.

Suddenly, error below:

Error: 'UploadTaskSnapshot' isn't a type

Code:

final StorageUploadTask uploadTask = ref.putFile(
            compressedFile,
            new StorageMetadata(
              contentLanguage: 'en',
              customMetadata: <String, String>{
                'pb': 'user_photo',
                'datemodified': new DateTime.now().toString(),
                },
            ),
          );
          print("Start upload");
          UploadTaskSnapshot uploadSnapshot = await uploadTask.future;

          print("image uploaded");

What actually happened?

LiveRock
  • 1,419
  • 2
  • 17
  • 27
  • Looks like a dup of https://stackoverflow.com/questions/50404310/how-to-get-full-downloadurl-from-uploadtasksnapshot-in-flutter/50404432#50404432 – Günter Zöchbauer Oct 18 '18 at 15:20

1 Answers1

1

The last update from yesterday broke some things , they didn't mention on the changelog : https://pub.dartlang.org/packages/firebase_storage#-changelog-tab-

You can force one version before, using:

firebase_storage: "1.0.2"

diegoveloper
  • 93,875
  • 20
  • 236
  • 194