Flutter/Dart 扩展和智能感知无法在 VSCode 上运行

Flutter/Dart Extensions and intellisense not working on VSCode

我正在使用 VSCode 和 months.I 的 dart 扩展,在 VS Code intellisense 上遇到错误,该错误只出现在我的存储库版本中,而不出现在任何其他版本中 developers.This 明显的错误实际上并没有阻止我 运行ning flutter 运行 或构建 aar。所以我认为这是扩展本身的问题。这是 dart:convert 和 dart:core 之间的字符串 class 的多重引用错误。我无法解决错误,所以我决定使用以下步骤卸载并重新安装 VS:

自从重新安装后,我无法获得智能感知和代码自动完成 working.The 代码突出显示工作正常,但查找参考和跳转到参考根本不起作用。

Flutter doctor op:
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale en-IN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.55.0)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Setting.json

{
    "[dart]": {
        "editor.formatOnSave": true,
        "editor.formatOnType": true,
        "editor.rulers": [
            80
        ],
        "editor.selectionHighlight": false,
        "editor.suggest.snippetsPreventQuickSuggestions": false,
        "editor.suggestSelection": "first",
        "editor.tabCompletion": "onlySnippets",
        "editor.wordBasedSuggestions": false
    },
    "files.autoSave": "afterDelay",
    "dart.debugExternalLibraries": false,
    "dart.debugSdkLibraries": false,
    "editor.multiCursorModifier": "ctrlCmd",
    "dart.lineLength": 1000
}

请帮助解决这个问题,如果需要其他项目,请告诉我。

当我检查到稳定版的flutter SDK并升级到最新版本的Flutter时,问题得到了解决。这确保了 Intellisense 正常工作并且 dart SDK 正常工作。

在此之后,即使签出特定版本的 SDK,智能感知工具也能正常工作。