Setting up the command line and saving path variables
Now that you have installed the Flutter SDK, there are a few more steps needed to make the software accessible on your computer. Unlike apps with user interfaces (UIs), Flutter is primarily a command-line tool. Let’s quickly learn how to set up the command line on macOS, Windows, and Linux in the following sections.
macOS command-line setup
To use Flutter on macOS, you need to save the location of the Flutter executable to your system’s environment variables.
Newer Macs use the Z shell (also known as zsh). This is basically an improved version of the older Bash, with several additional features.
When using zsh
, you can add a line to your zshrc
file, which is a text file that contains the zsh
configuration. If the file does not exist yet, you can create a new file as follows:
- Open the
zshrc
file with the following command in your Terminal:nano $HOME/.zshrc
...