FLUTTER FOR BEGINNERS TUTORIAL LEARN HOW TO INSTALL AND SET UP
Tags: flutter
Published: 2019-08-11 10:37:54

What is Flutter


Flutter is UI toolkit developed by Google for use to create multi-platform apps, that 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 Googles Fuschia Os which will be capable of running on all major platform from embed system to phones to computers.


Downloading and Installing Flutter


Before 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, extract the zip into the folder.

Example here for 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 into the folder, its time now to extract the zip file we downloaded from 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"


Flutter Development Environment Setup


We are almost done, now let us run flutter doctor and finish installing. also as show 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 its time to finish up by finally updating our path so that we can run flutter everywhere in our system by running this.

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 some 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 the 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, get 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 its the lightest editor you can use to develop flutter apps unlike other once like 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.


Conclusion


So in this post, I took you through downloading extracting installing and setting development environment, then we created and ran our first app.

Thank you for your time.

Happy Coding.