VSCode, Flutter SDK Version Erroneous?

Viewed 914

I believe my Flutter SDK version is being erroneously reported and do not know where the conflict is.

When running flutter doctor it reports Flutter 2.2.3 • channel stable. However, the bottom toolbar in VSCode displays Flutter: 2.0.4.

Is there a reason VSCode and terminal would report the Flutter version differently? And how can I ensure I am running the correct SDK version?

2 Answers

Look into "dart.flutterSdkPath" setting in vscode and change if needed. The problem could be with you having multiple versions of Flutter on the disk and auto-find fails to find the correct one (last version), manually override.

In my case my path( environment variables) of SDK was set wrong check yours first and if still not worked try running commands Flutter clean Flutter upgrade

Related