Flutter — Installation on Linux

Faran Mohammad
4 min readDec 6, 2020

--

Flutter logo (src: flutter.dev)

Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google, Fuchsia and the web from a single codebase. (Wikipedia)

Primarily, I use Flutter to develop mobile apps for Android and iOS devices. I found Flutter very easy compared to traditional Android Development. Flutter uses Dart as its primary language and we can develop apps by either using Android Studio or Visual Studio Code.

I am an open-source enthusiast and a full time Linux user, and during my initial Linux days, I faced many challenges while installing softwares on my Linux PC and other workarounds. I have already published another blog post on how to install Postman on Linux.

Anyway, in this post I am going to explain how to install Flutter and set it up on a Linux based machine. I personally use Manjaro KDE as my Linux distribution, but the process will be the same for any other distro.

  1. Log on to flutter.dev and click on the Get Started button. Click on Linux and scroll down to the Install Flutter manually section. Next, click on the tar.xz file provided there, your download will start.

2. While the Flutter SDK is downloading, open a new tab and download Android Studio.

Please see that you have sufficient amount of download data left, because Android Studio requires a huge amount of data to install and update.

3. I have moved my files from the Downloads folder to the Apps folder in my home directory.

This is not a necessary step, I just like to keep things organised

4. Next, move into your Apps directory and fire up a terminal. Using the tar xf command, extract the flutter SDK (or you can use any other way of extracting the files, I use the terminal because it makes me feel powerful).

[faran@megatron Apps]$ tar xf flutter_linux_1.22.4-stable.tar.xz

Wait for a few seconds until the extraction is complete, you’ll get a new folder in your Apps directory with the same name.

5. In this step, we are going to add path to the Flutter SDK, so that we can access Flutter from anywhere in our PC.

For this, navigate to the home directory, and make sure that you can see the hidden files and folders. Search for the file named .bash_profile. If you don’t have this file, create it. Open it using any editor. Go to the last line and add the path to your bin directory as such:

export PATH="$PATH:/home/faran/Apps/flutter/bin/"

Save the file and close it.

6. Navigate to the home directory and execute the source command on your .bash_profile file as such:

[faran@megatron ~]$ source /home/faran/.bash_profile

7. Run the flutter doctor command.

This is a sign that we have successfully installed Flutter but we’ll have to rectify the errors we got

In the next steps, we are going to set up Android Studio.

8. Navigate back to the Apps folder and unzip the Android Studio zip file that we had downloaded.

9. Open the extracted folder, go to bin and run the studio.sh file.

Running this command will launch Android Studio. You’ll see the splash screen followed by the setup wizard.

Keep everything standard and continue with the setup wizard

The downloads will take a few minutes depending on your bandwidth and speed.

After the setup is complete, you will get this window

Android Studio doesn’t come with Flutter support natively, so we need to install the Flutter plugin. For this, click on Configure>Settings.

10. Click on Plugins and search for flutter.

This will install Flutter and ask you to restart the IDE (You will also be prompted to install Dart, just accept it).

After Android Studio restarts, you’ll see the option to Create New Flutter Project on your screen

11. Create a new Flutter project and use the standard options.

On this window, you’ll have to add the Flutter SDK path manually

12. Once you see the Creating Flutter Project window, you’re good to go.

After it finishes, you’ll see the Android Studio main screen.

--

--

Faran Mohammad
Faran Mohammad

Written by Faran Mohammad

I am a Software Development Engineer. I like reading and writing about tech. Being a geek, I like to experiment with various technologies and stacks.

No responses yet