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 did not work, remove the double quote from path or use the full path explicitly instead of ~
.