vs code dart analyzer 不启动 ,找不到类的定义 解决方法

To fix, just give the Dart extension an explicit reference to your SDK installation(s) using the extension settings ([Ctrl + ,], type ‘Dart:’) or by directly editing settings.json ([Ctrl + Shift + P], type ‘settings.json’, [Enter]).

If you have both Flutter and the full Dart SDK installed, add both listings:

If you have only one installed (most commonly just Flutter), you can just add that one:


来自: https://stackoverflow.com/questions/54488236/vscode-dart-analyzer-stopped-recognizing-flutter-dart-code