Flutter: About changing the version of packages such as flutterfire

413

listAll method is still not added to the firebase_storage plugin, therefore even if you upgrade to firebase_storage 4.0.0 you can't use listAll.

The following url https://github.com/danysz/flutterfire, is the repository of the person who implemented listAll, but the pull request is still not merged. You can follow it here:

https://github.com/FirebaseExtended/flutterfire/pull/232

Therefore if you want to use listAll then keep using the same versions of the other firebase products and keep using the above url.


Regarding updating plugins:

To upgrade to a new version of the package, for example to use new features in that package, run flutter pub upgrade (Upgrade dependencies in IntelliJ or Android Studio) to retrieve the highest available version of the package that is allowed by the version constraint specified in pubspec.yaml. Note that this is a different command from flutter upgrade or flutter update-packages, which both update Flutter itself.

Share:
413
森口万太郎
Author by

森口万太郎

Updated on December 23, 2022

Comments

  • 森口万太郎
    森口万太郎 over 1 year

    I am making an application with flutter and firebase. Regarding packages (libraries), I heard that various flutterfire packages have been upgraded recently.

    For flutter I think that package management is done by listing the package names we want to install in the pubspec.yaml file. What should I do when the package is updated?

    In the upper right corner of the screen pub upgrade There is a link saying, but it seems that pressing this does not change the version of each package to the latest version. Do I have to regularly check for updates myself and manually rewrite this?

    pub upgrade What is the function in the end? Where should I look to find out?

    Another question. At the moment, the firebase_storage package of the pubspec.yaml file is described as follows.

      firebase_storage:
        git:
          url: git://github.com/danysz/flutterfire.git
          ref: master
          path: packages/firebase_storage
    

    In order to use the method "listAll" to get all the data of firebase_storage like this I've been taught how to write it on another site before. When I update other packages of flutterfire in pubspec.yaml file, pub get When I do, I get an error in the firebase_storage part.

    However, if I specify the latest version of firebase_storage as below, the listAll method cannot be used.

    firebase_storage: ^4.0.0
    

    After all, if I do not update the package in the pubspec.yaml file, the app works at the moment (all can be obtained by the "listAll" method), But I don't think there is an option to never update the pubspec.yaml file at all. How can I get the package version up to date and use the listAll method?

  • 森口万太郎
    森口万太郎 over 3 years
    Thank you for your answer. We don't know when the listAll method will eventually be implemented, right? I just have to wait for it or do it myself using the methodchannel and rewrite the code with it when the listAll method is implemented, right?
  • Peter Haddad
    Peter Haddad over 3 years
    It's already done here github.com/danysz/flutterfire