Instructions #
Prerequisite #
Open “Terminal” app (you can just search in spotlight).
Type git
to verify that you have GIT installed.
If you don’t have it will ask you if you want to install developer tools, go
ahead and do that.
If you are on the new Apple Silicon Mac you need to install the translation layer for x86 code.
sudo softwareupdate --install-rosetta --agree-to-license
Install Flutter-SDK #
Now get flutter directly from github.
I do not recommend synchronizing Flutter SDK to iCloud.
Please exclude ~/flutter
or choose a different location.
cd ~
git clone https://github.com/flutter/flutter.git -b stable
You need to figure out what shell you are using.
echo $SHELL
Edit $HOME/.bashrc
or $HOME/.zshrc
depending on the output.
For the rest if the text I’m going to assume you are using zsh so the shell
config is referred to as .zshrc
.
You can use either vim
or nano
to edit the config.
In nano
you can save with Control+o then exit with Control+x.
In vim
it is ESCAPE then type :wq
.
Add following line at the end of the file:
export PATH="$PATH:$HOME/flutter/bin"
If you cloned Flutter to a different folder than your home folder
~
then you need to adjust the path above accordingly.
Close your terminal and open it again.
Run following command to check flutter dependencies:
flutter doctor
Install Chrome if missing.
Don’t worry about the other issues for now.
iPhone #
If you have an iPhone and would like to be able to run Flutter projects on it, then there is a bit of extra setup you will need to do.
Next you will install an IDE for Flutter, namely Android Studio. Don’t let the name fool you, as it is great for Flutter development no matter the platform.