How to get Flutter SDK path after installing using Homebrew

Viewed 5768

Installed flutter using homebrew: https://formulae.brew.sh/cask/flutter#default

I can't find the SDK Path, tried copy and pasting this:

1./opt/homebrew/Caskroom/flutter/2.0.5/flutter/bin/internal/shared.sh, and, /opt/homebrew/bin/flutter'

but the result shows that the folder specified as the FLUTTER SDK home does not exist, how am I able to find the Flutter SDK path

3 Answers

Type flutter doctor -v in Terminal, the first line will show the location!

enter image description here

If you install flutter using brew install --cask flutter and you are on macOS version 12.2.1. Then flutter is located in the Caskroom folder.

For example, usr/local/Caskroom/flutter/2.10.3/flutter

In my case I installed flutter version 2.10.3 so that is the reason you use flutter SDK located inside the version folder/directory.

  1. find your homebrew futter path

    flutter doctor -v
    
  2. Copy the path under the Flutter stable channel info, eg. • Flutter version 3.0.5 at /opt/homebrew/Caskroom/flutter/3.0.5/flutter

  3. Open vsCode settings, search flutter path, add the path you just copied to these two places:

  • Dart: Flutter Sdk Path (inside the JSON file)
  • Dart: Flutter Sdk Paths
  1. Reload vsCode
Related