This is how to install Flutter On Ubuntu

What is Flutter?

Flutter is a UI toolkit developed by Google for use to create multi-platform apps, which means that you can use flutter to develop applications that run on both iOS and Android with the same codebase, Desktop, and Web as well.

Flutter uses Dart programming language, which is powerful hence making the apps developed by Flutter to be blazing fast.

It is also the default SDK for developing apps for the upcoming Google Fuschia Os which will be capable of running on all major platforms from embedded systems to phones to computers.

Installing Flutter

NOTEBefore installing flutter ensure you have Android Studio installed and virtual devices installed and set up.

We are going to download the recommended package depending on our system from the Flutter official website. Get the downloaded zip file then create a folder, and extract the zip into the folder.

Ubuntu user, “mkdr” creates the folder in which you will extract and install the flutter package,

$ mkdr fldev

After running that, now move to the created folder as shown below

$ cd fldev

After locating the folder, it’s time now to extract the zip file we downloaded from the flutter website into the folder as shown below…Remember the part {file_verion_name} is the name of the file you downloaded so don’t use the one below directly.

$ tar xf ~/Downloads/{file_verion_name}.tar.xz

Finally add flutter tools to your path, note that this will make flutter available on the current terminal only.

export PATH="$PATH:fldev/flutter/bin"

We are almost done, now let us run flutter doctor and finish installing. also as shown below…

$ flutter doctor

This will check your system for dependencies that are essential for flutter app development. With that checked, if everything is ticked OK then it’s time to finish up by finally updating our path so that we can run flutter everywhere in our system by running.

Running this opens up the system file called .bashrc, it sometimes differs from system to system, so running this will make the file editable and make a few changes to it

$ nano $HOME/.bashrc

Once the file is open, copy-paste or just type it in, it is easier when you type it in, the following to the file. Remember to replace the {USER_NAME} part with your system user name for it to work.

export PATH="$PATH:/home/{USER_NAME}/fldev/flutter/bin"

After adding that into the file, now the click CTR+O to save and then CTR+X to exit the editor, then finish up by running the following into the terminal

$ echo PATH

All done, here is the sweat part, we can now create our first android application, by running the following. This will create our app and set up all the required packages and dependencies.

$ flutter create newapp

Move into the directory you have the app in then run the following

$ cd newapp

Running your first flutter app

After you located to the newapp folder, we can now run our first app by running the following in the terminal.

$ flutter run

Doing this will check if there is any device connected, so ensure your device is connected or your virtual is running for the process to complete without error.

Chose your Flutter editor

With all that set you can now choose your favorite editor whereby you will develop and debug your applications. I personally prefer Visual Studio Code because it provides the best experience during development and debugging and it’s the lightest editor you can use to develop flutter apps unlike others once as Visual Studio, Android Studio, or IntelliJ IDEA.

With Visual Studio Code, you only need Flutter and Dart plugins which you add, and boom you are set to go, no hustle.

Thank you for your time.

Happy Coding.

I love coding and writing
Posts created 25

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top