简体   繁体   中英

Is it required to update Dart SDK for VScode?

When I check dart and flutter version from VScode it shows

Dart VM version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "windows_x64"

Flutter 2.0.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision adc687823a (12 days ago) • 2021-04-16 09:40:20 -0700 Engine • revision b09f014e96 Tools • Dart 2.12.3

But when I run VScode it prompts me to update Dart SDK

Version 2.12.4 of the Dart SDK is available (you have 2.7.0). Some features of Dart Code may not work correctly with an old SDK.

At the same time the dart sdk page says

As of Flutter 1.21, the Flutter SDK includes the full Dart SDK. So if you have Flutter installed, you might not need to explicitly download the Dart SDK. Consider downloading the Dart SDK if any of the following are true:

  • You don't use Flutter.
  • You use a pre-1.21 version of Flutter.
  • You want to reduce disk space requirements or download time, and your use case doesn't require Flutter. For example, you might have a continuous integration (CI) setup that requires Dart but not Flutter.

So should I update dart sdk? But as it says if you have Flutter installed, you might not need to explicitly download the Dart SDK , it' a litle bit confused., because I have Flutter installed.

You no longer need to download a separate dart SDK. Remove it (at least move it out of the way), and do flutter upgrade . If "dart --version" still works, you're golden, although you may need to remove any manually-set dart SDK paths. I'm pretty sure all the supported IDE extensions for Dart pick up the proper "buried within flutter" paths for the Dart SDK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM