I updated from Mojave to Catalina and running Terminal, switched to the default/preferred zsh shell, from the bash shell.
Then was hit with
zsh: command not found: flutter
so, followed the advice seen elsewhere to only add the following to Users/MyUserId/.zshrc
export PATH="$PATH:/YOUR_FLUTTER_DIR/flutter/bin"
echo $PATH showed that /Users/MyUserId/flutter/bin was now one of the configured PATHs.
However, I couldn't get "flutter doctor" to work but came across a post on jelliesgame.com which suggested copying
Users/MyUserId/.bash_profile to Users/MyUserId/.zshenv
There are quite a few answers mentioned above pretty much same. I would say worth seeing into the SHELL using echo $SHELL command,
If you’re using Bash, edit $HOME/.bash_profile or $HOME/.bashrc. If you’re using Z shell, edit $HOME/.zshrc. If you’re using a different shell, the file path and filename will be different on your machine.
N.B. Don't forget you need to add VIM before either command in the terminal app.
For further details, click the link Update your path, and look into the section Update your Path. I hope it would help many especially new comers to MAC OS. Cheers
For me .zshrc worked instead of .zprofile. I believe this is because I had created .zshrc earlier and now when I tried creating .zprofile, it was looking into .zshrc file.