Setup Flutter on Linux less than 10mins part-2

Hima Bindu
2 min readAug 30, 2020

Here, we will be setting up flutter in another way. This recommended if you want to know everything while setting up. Like each and every matter…

So, let’s start

Firstly, clone the git repo in your local machine where you want to work from.

git clone https://github.com/flutter/flutter.git

You can also find this on the official flutter website.

After cloning it.

Go to your “.bashrc” file and type this (instead of [PATH_TO_FLUTTER_GIT_DIRECTORY] type your path of the directory that you have previously cloned the repo.)

export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"

For example, in my situation, it’s this “/home/himabindu/Desktop/Fluttering/flutter/bin/flutter”

I cloned the git repo in the “Fluttering” folder.

Now let’s check the path of dart also. Because flutter uses dart and it’s necessary that both have to be in the same directory.

We can use which command to verify our paths.

which flutter
which dart
which flutter dart
Ignore ^C (-_-)

Now for people who followed my first blog. Obviously, they will have different paths. And they also need to install dart separately in some cases.

So, if you are the one gone into trouble for setting the path after installing with the snap. Follow these commands to set your path! and thank me later : )

Just clone the repo as said before, into your working directory. And remove flutter that’s installed with snap.

sudo snap remove flutter

This command removes flutter that you have installed with snap before.

Now run these commands!

which flutter
which dart
which flutter dart

You will find that both flutter and dart are in the same bin directory like this!

/home/himabindu/Desktop/Fluttering/flutter/bin/flutter
/home/himabindu/Desktop/Fluttering/flutter/bin/dart

Thank you so much! see you in the next blog : )

--

--