VSCode Can't Find the PATH To the Flutter SDK
On macOS this was solved by following these steps.
First find where you downloaded the flutter sdk (Can be downloaded from here). It should be in your downloads folder unless you selected somewhere else.
Next:
- Open up Terminal. Run the following command: sudo nano /etc/paths
- Enter your password, when prompted.
- Go to the bottom of the file, and enter the path you wish to add.
- Hit control-x to quit.
- Enter “Y” to save the modified buffer.
If the sdk is downloaded into your Downloads folder, your path to add should be /Users/yourusername/Downloads/flutter/bin
Lastly, quit and restart your terminal windows and VS Code. After restarting, both apps should recognize flutter and running flutter doctor should now work.
If you installed Flutter extension please restart VS_CODE and try it again. I already had the same problem.