Flutter lower dart version

12,385

Solution 1

In the Flutter install directory execute

git checkout v"0.5.0" // for example

You can check which versions are available in the Flutter GitHub repository https://github.com/flutter/flutter

Solution 2

You can only change the Dart version if you change to a Flutter version that contains the desired Dart version.

Change the dependency to

dev_dependencies:
  intl_translations: ^0.17.0
Share:
12,385

Related videos on Youtube

Canberk Ozcelik
Author by

Canberk Ozcelik

5y experienced Mobile Application Developer who graduated from Işık University Computer Science Department of Software Engineering. I'm currently working as an Android Developer. I direct myself to remain updated with recent events in the Android and iOS Community. In my spare time, I like to read/write content on Hacker News and Medium that are related to my interests such as mobile tech, cross-platform, UX, ML, etc. I'm always open to new opportunities and challenges.

Updated on June 04, 2022

Comments

  • Canberk Ozcelik
    Canberk Ozcelik almost 2 years

    I'm getting the following error due to Dart version of my flutter setup when I run the flutter get packages command:

    [project_name] flutter packages get Running "flutter packages get" in project_name...
    The current Dart SDK version is 2.1.0-dev.0.0.flutter-be6309690f.

    Because project depends on intl_translation >=0.14.0+1 <0.17.0 which requires SDK version >=1.12.0 <2.0.0, version solving failed. pub get failed (1) exit code 1

    My framework version:

    Flutter 0.6.0 • channel beta • https://github.com/flutter/flutter.git
    Framework • revision 9299c02cf7 (2 weeks ago) • 2018-08-16 00:35:12 +0200
    Engine • revision e3687f70c7
    Tools • Dart 2.1.0-dev.0.0.flutter-be6309690f

    I would like to learn if there's some kind of command to lower dart-sdk version of the flutter framework, thanks in advance.

  • Canberk Ozcelik
    Canberk Ozcelik over 5 years
    besides changing the dependency, how is it possible to change flutter version?
  • Canberk Ozcelik
    Canberk Ozcelik over 5 years
    can you be more specific on what it really does?
  • Günter Zöchbauer
    Günter Zöchbauer over 5 years
    You can checkout a specific branch using flutter channel or a specific tag using git checkout [branch, tag or commit hash]. Then run flutter doctor
  • Canberk Ozcelik
    Canberk Ozcelik over 5 years
    so the dart sdk is basically bundled within flutter sdk there's no way to configure versions separately
  • Günter Zöchbauer
    Günter Zöchbauer over 5 years
    Exactly, there is no way.
  • Canberk Ozcelik
    Canberk Ozcelik over 5 years
    so basically, I have changed the dependency to intl_translation: 0.17.0 and it's working with the latest flutter/dart-sdk version
  • Günter Zöchbauer
    Günter Zöchbauer over 5 years
    Sounds great. .