1. Download from GitHub
Run following command and clone flutter GitHub to your system
git clone https://github.com/flutter/flutter.git -b stable
2. Add flutter to your Path
2.1. Make sure where you cloned flutter (get path)
2.2. Open (or create) $HOME/.bash_profile
. You can do that by using terminal text editor by going in terminal and typing nano ~/.bash_profile
2.3. If you are using a different shell, the file path and filename will be different on your machine for instance Z shell
by default, so edit file nano ~/.zshrc
2.4. Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY]
to be the path where you cloned Flutter’s Git repository is:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
For example
export PATH=~/Documents/flutter/bin:$PATH
2.5. Press Ctrl + X
and when it asks you to save the file, choose Yes
2.6. Run source $HOME/.bash_profile
to refresh the current window or restart the terminal
2.7. Verify that the flutter/bin
directory is now in your PATH by running:
echo $PATH
2.8. For ZSH
2.8.1. Open Terminal
2.8.2. Run: nano ~/.zshrc
2.8.3. Add following code
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
2.8.4. Run following command
source ~/.zshrc
2.8.5. Restart terminal
2.8.6. Run
flutter doctor -v
3. Install flutter
Run flutter
in command line and wait for flutter to be installed.
4. Flutter Doctor
Run flutter doctor
command and make sure everything is ready for you to start development.
- Last updated 2 years ago
Be the first to leave a comment.
You must login to leave a comment