Sitemap
James Harrison

James Harrison

How to Install Flutter

3 min readFeb 11, 2022

--

This guide will help you get up and running with flutter development very quick! For some reason this confused me…so if it confused you too this will help.

Press enter or click to view image in full size
Photo by Joshua Reddekopp on Unsplash

NOTE: Before starting this installation make sure you have Xcode and cocoapods downloaded if youre on a mac or android studio if you’re on a PC.

Flutter Download

Navigate to the URL below for the flutter documentation to download flutter.

Flutter Docs! Click me

Once here click on your operating system, this guide is primarily for macOS Users.

Press enter or click to view image in full size

After selecting your OS, I chose macOS you can now download the flutter SDK by clicking the download button here.

Press enter or click to view image in full size

Install Flutter SDK

Now that the file is downloaded double click the file to un-zip it and move the folder to the desired location on your computer.

I would create a folder called Developer under your user by going to finder clicking your user name and then creating a folder called Developer. I keep all programming related things in this folder.

Now find the zip file for the flutter download and double click it to unzip it

After its unzipped you should see the flutter folder, drag that into your new Developer folder.

Terminal

Now open terminal by typing cmd + space and then typing the word terminal.

Get James Harrison’s stories in your inbox

Join Medium for free to get updates from this writer.

We need to figure out what terminal shell is installed on your computer, different shells have different startup files. Run the command below to figure out what shell youre on.

echo $SHELL
  • If the results is /bin/zsh then you are on the ZSH shell
  • If the results is /bin/bash then you are on the bash shell

Add Flutter File Path

Now we need to add the flutter file path to the startup file for your shell.

ZSH

For the ZSH Shell, the startup file is called .zshrc, we need to update this with file to include the path to the flutter folder you just downloaded. This will tell your computer where flutter is installed, when you try to run it.

nano $HOME/.zshrc

Bash

For the bash Shell, the startup file is called bash_profile, we need to update this with file to include the path to the flutter folder you just downloaded. This will tell your computer where flutter is installed, when you try to run it.

nano $HOME/.bash_profile

Once you’re in the proper startup file paste the following line below into that file. You must replace pwd with the path that your flutter folder is located.

export PATH="$PATH:`pwd`/flutter/bin"

Example based off my path:

export PATH="$PATH:/Users/jamesharrison/Developer/flutter/bin"

So your file should look something like this

Press enter or click to view image in full size

Once you are done then click ctrl X then Yand then Enter this will save and quit the file.

After that the final step is to quit terminal and then reopen it.

Once back in terminal type flutter doctor This will tell you if you are missing anything or if the install went correct.

Press enter or click to view image in full size

--

--