Image for post
Image for post
Flutter — A Mobile App Development Tool

This is my first article about flutter. I am using flutter for mobile app development. There are so many advantage to use flutter. This is very interesting and easy to learn. It took 15–20 days to learn flutter. I am making you more interested to use flutter providing this article.

I wanted to go for mobile app development. So, I got confused, which technology should I use to develop. Then I heard about flutter. I got interested after reading about flutter and watching some tutorials. It’s really easy to learn to use and easy to learn. I am going to show you how much easy it is!

First of all let me tell about flutter. Flutter is a tool to develop mobile application offered by Google. It is a cross-platform. Developer can build mobile apps for Android and iOS at the same time. So, developers not need to develop mobile apps for Android and iOS separately. This is the biggest advantage of using flutter. It reduces cost for hiring Android Developer and iOS Developer. Because one tool can handle both. That’s why flutter become very famous. Now flutter have version 1.0.

While developing flutter, many big companies started to use flutter. Flutter provides high rendering and powerful engine. That’s why it gives you very beautiful UI. It gives you very faster development. It have hot reload facilities. Hot reload helps you quickly and easily experiment, build UIs, add features, and fix bugs faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android. Flutter provides full native performance that means it incorporate with critical platform such as navigation, scrolling, icons, fonts etc.

Why flutter ?

Everyone ask this question. Flutter is really simple. Everything is a widget in flutter. Every elements such as container, box, padding, buttons etc are widget. That’s why it is powerful. It runs over HTML, CSS, JavaScript. And it uses Dart language which is a powerful programming language. Developer can build Android and iOS app in a single code-base. Unlike java, it does not need any HTML, CSS or XML. So, it’s really easy. I will show you a sample code. Before that it need to be installed.

Installation

Flutter is compatible with Android studio, Intellij, VS Code. You can use any of these. So, first of all install any of these IDE. You need to download a zip file from flutter website. You can choose windows, macOS or linux. After downloading the zip file, extract that zip file in your desire location. Suppose in windows mostly the directory is using like this ‘C://src/flutter’. Then you need to change the Environment Variable to run flutter. You need to check the full path of flutter in environment variable settings that the path is already or not. If it’s not there then set the path eg. ‘C://src/flutter/bin’. Then run this command “flutter doctor” in command prompt. This command is to check that everything is correct or not. For more information visit https://flutter.io/docs/get-started/install

Hello World Code

I will show you the simple code of hello world app.

After installing flutter, when you create a flutter app project you can see there a file called main.dart. Dart code start its execution from the main function that should be included in main.dart file. There will be some code already. Just remove that start to write the following code.

At first, import dart material library, this will provide a function to launch applications.

This function is for run the app and it is called as runApp and accept the widget parameter. So, you need to add this package. Here is full code:

It will give you the output like this:

Image for post
Image for post
Output from that code

Bang! You are there. It gives you the hello world app for a few lines of code! See it’s so easy to build and easy to code. For more information follow this https://flutter.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store