Flutter commands can be executed from macOS terminal app after adding the path variable to installation of flutter directory on the local machine. You can set Path variable temporarily by executing the following command in the Terminal app or within the Terminal window inside Visual Studio Code
FLUTTER_INSTALLATION_DIRECTORY represents the installtion of flutter SDK on your local macOS
Setting PATH variable permanently
Mac users having Catlina OS and above can follow the below mentioned steps for setting the PATH variable permanently.
- Launch Terminal App.
touch ~/.zshrcand press enter
export PATH = $PATH[FLUTTER_INSTALLATION_DIRECTORY]/bin
- save the changes.
- Reload the changes by typing
Now you should be able to run all flutter commands using terminal app.