- Open Terminal.
- Determine which shell you are using by running the following command:
- Based on your shell, open the appropriate configuration file using the
- For Bash (default macOS shell):
- For Zsh (default for macOS Catalina and later):
- For Fish:
- Add the following line to the file, replacing
[PATH_TO_FLUTTER_DIRECTORY]with the path to the extracted Flutter SDK directory:
For Bash or Zsh:
set -gx PATH $PATH [PATH_TO_FLUTTER_DIRECTORY]/flutter/bin
- Save the file and exit:
nano: Press Ctrl + X, then Y, then Enter.
- Apply the changes:
- For Bash:
- For Zsh:
- For Fish: Restart the terminal.