Visual Studio 代码 Flutter 无法更新 Dart SDK

Visual Studio Code Flutter Cannot Update Dart SDK

Because depends on cupertino_icons >=1.0.1 which requires SDK version >=2.12.0-0 <3.0.0, version solving failed.

每当我尝试 flutter runflutter pub getflutter pub upgrade 时,我都会在控制台中得到这个 return。我也尝试过 flutter update-packages returns

Flutter is already up to date on channel stable Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7891006299 (3 weeks ago) • 2020-12-10 11:54:40 -0800 Engine • revision ae90085a84 Tools • Dart 2.10.4

如何更新 Dart SDK?

您应该在 pubspec.yaml 中使用 1.0.0 版的 cupertino。我认为新版本的 cupertino

有问题
 cupertino_icons: ^1.0.0

从 2021-03-10 或更早开始,不再需要使用 cupertino_icons 1.0.0 或切换到 Beta 更新频道 (flutter channel beta)。只需升级(flutter upgrade)并重新运行 flutter pub get。有关详细信息,请参阅 issue 72231