Flutter下镖版

Flutter lower dart version

当我 运行 flutter get packages 命令时,由于我的 flutter 设置的 Dart 版本,我收到以下错误:

[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

我的框架版本:

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

我想知道是否有某种命令可以降低 flutter 框架的 dart-sdk 版本,在此先感谢。

如果您更改为包含所需 Dart 版本的 Flutter 版本,则只能更改 Dart 版本。

将依赖更改为

dev_dependencies:
  intl_translations: ^0.17.0

pubspec.yaml文件中添加如下依赖

version: 1.0.0+1

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

在Flutter安装目录下执行

git checkout v"0.5.0" // for example

您可以查看 Flutter GitHub 存储库中可用的版本 https://github.com/flutter/flutter