Flutter has good installation documentation, but to update flutter path permanently on macOS need to follow this steps
- Download Flutter Framework from here
https://flutter.dev/docs/get-started/install/macos - If bash Shell then run this command in terminal
nano ~/.bash_profile
If zsh Shell then run this command in terminal
nano ~/.zshrc - Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo:
export PATH=”$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin”
for example:
export PATH=”$PATH:user/rohan/flutter/bin” - press CTRL X and when it asked you to save the file, choose yes
- after that, if bash Shell then run source ~/.bash_profile to refresh the current window or restart the terminal
if zsh Shell then run source ~/.zsh to refresh the current window or restart the terminal