Adding Flutter SDK is quite challenging especially for the people coming from Windows background.
Here are simple steps to add Flutter SDK Path on Mac OS X.
Let’s assume that you have placed the Flutter SDK at the following location:
/Users/apple/Downloads/flutter/bin
Now perform the following steps:
- Open the terminal
- Run the following command:
sudo nano /etc/paths - Enter password
- Path file will be shown in editor
- Add a new line and paste the Flutter SDK path /Users/apple/Downloads/flutter/bin
- Press control+x to quit the file
- Enter Y to save the changes
- Run the following command to see if Path is updated correctly:
echo $PATH
Now, Flutter SDK path is saved permanently.
Close the terminal and re-open it and run the flutter doctor to see if it is configured correctly.