zsh: command not found: flutter
You need to update the environment path.
Open terminal.
vim $HOME/.zshrc
Press "I" key for going to insert mode.
add the following line in the opened file:
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
Press "Esc" then write
:wq!
in terminal and press enter to exit vim.Reopen the terminal and check "flutter doctor"
If this solution not work, remove the double quote from path.
Working on macOS Catalina 10.15.5 (19F101). I have used .zprofile instead of .zhrc
Provide Full Disk Access to Terminal by Setting -> Security & Privacy -> Full Disk Access. Add Terminal
If the current terminal uses bash, change to zshell using the below command
chsh -s /bin/zsh
In the root directory i.e something like /Users/^YourAccount^ execute the below
touch .zprofile
vim .zprofile
Press I to enter insert mode. Type the below
export PATH=$PATH:/Users/^YourAccount^/^YourPath^/flutter/bin
Save and quit by pressing Esc, then :wq and Enter
Close Terminal and reopen Again. Then try executing
flutter
command
You must update your environment $PATH variable.
1) Open the file $HOME/.zshrc
$HOME
is your home path
2) add the following line in the opened file:
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
3) save the changes and restart your terminal session.
The process is also documented here