Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to downgrade the dart version? #21599

Closed
xioxu opened this issue Sep 8, 2018 · 2 comments
Closed

How to downgrade the dart version? #21599

xioxu opened this issue Sep 8, 2018 · 2 comments

Comments

@xioxu
Copy link

xioxu commented Sep 8, 2018

I upgrade the dart version to 2.1 in my Windows Env, but it brokes my project, since one module 'audio-play' throws :
The current Dart SDK version is 2.1.0-dev.3.1.flutter-760a9690c2.
Because ***** depends on audioplayer any which requires SDK version >=1.8.0 <2.0.0, version solving failed.
I try to reinstall the flutter to a old version, and I can sure the dart-sdk is 2.0, but the flutter --version still outpus the dart version is 2.1.
So, I realy want to know how to make my project works, thanks in advance.

@zoechi
Copy link
Contributor

zoechi commented Sep 8, 2018

You can't downgrade Dart independent of Flutter.
You can only downgrade Flutter to a version that contains the Dart version you desire.

You can also use dependency_overrides to overrule dependency constraints.
https://www.dartlang.org/tools/pub/dependencies#dependency-overrides

dependency_overrides:
  audioplayer: ^0.5.0

Ideally you'd report an issue with the package that claims not to be compatible with Dart 2.0 final
or even better create a pull request with a fix.

To revert to an older Flutter version you can use git to checkout a specific tag like 0.5.1

@github-actions
Copy link

github-actions bot commented Sep 2, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants