Search code examples
flutterdartflutter-dependenciesdart-pub

Flutter dependency issue after upgrade


After upgrading flutter to - Channel stable, v1.12.13+hotfix.5, the plugins audio_service and story_view seems to have encountered a problem :

Because app depends on story_view ^0.11.0 which depends on rxdart ^0.22.2, rxdart ^0.22.2 is required. So, because app depends on rxdart ^0.23.1, version solving failed. pub get failed (1; So, because app depends on rxdart ^0.23.1, version solving failed.) Process finished with exit code 1.

I am using

  • story_view: ^0.11.0
  • audio_service: ^0.5.6

Which are both the latest version now. Additionally I haven't added rxdart plugin to my project.


Solution

  • It looks like both story_view and audio_service depend on rxdart, but they're using incompatible versions which is causing version solving to fail.

    There's a few options to move forward here:

    • File an issue against the story_view plugin requesting they update their rxdart dependency to the latest version
    • Find story_view in your .pub_cache on disk and manually modify the pubspec.yaml for your copy on disk (this should allow for your flutter pub get to perform version solving correctly)
    • Create a fork of story_view, update it's pubspec.yaml to depend on rxdart: ^0.23.1, and create a path dependency to it

    Obviously, none of these solutions are ideal but that should be able to get you unblocked until story_view updates to the newest rxdart.