felangel / mocktail

A mock library for Dart inspired by mockito
https://pub.dev/packages/mocktail
MIT License
617 stars 81 forks source link

After upgrading to Flutter V3.0.0, error while doing Flutter pub outdated #131

Closed juliuskopp closed 2 years ago

juliuskopp commented 2 years ago

Describe the bug After I upgrade to Flutter V3.0.0, I also wanted to upgrade the packages, and then run the command : Flutter pub outdated or Flutter packages upgrade

To Reproduce Upgrade to Flutter V3.0.0

  1. run the commande line : flutter pub outdated or flutter packages upgrade
  2. see error : Error on line 8, column 8 of D:\src\flutter.pub-cache\hosted\pub.dartlang.org\mocktail-0.1.2\pubspec.yaml: Invalid version constraint: Expected version number after ">=" in ">=2.12-0-0 <3.0.0", got "2.12-0-0 <3.0.0". ╷ 8 │ sdk: ">=2.12-0-0 <3.0.0" │ ^^^^^^^^^^^^^^^^^^^ ╵ pub finished with exit code 65

Paste the output of running flutter doctor -v here.

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [version 10.0.19044.1706], locale fr-FR) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.2.0) [√] Android Studio (version 2021.2) [√] VS Code, 64-bit edition (version 1.67.1) [√] Connected device (1 available) [√] HTTP Host Availability

sabifa commented 2 years ago

Same issue here

Edit: Seems like removing the local pub cache folder (for windows: C:\Users\xxx\AppData\Local\Pub\Cache), running flutter clean and loading all packages again solved the issue. Could you please try that and report back @juliuskopp?

alehmazok commented 2 years ago

@sabifa Yes, it works, thank you! Use the command flutter pub cache clean instead of manual folder deletion.

juliuskopp commented 2 years ago

Hi, thank you for the fast reply. I did flutter pub cache clean and then flutter pub get and it worked when doing flutter packages upgrade