Friday, March 9, 2018

Getting Started with Flutter SDK Introduction with installation and run your first project



In a week ago actually more than a week, Flutter released its first beta version at the MWC in Barcelona In this video I'm gonna quickly explain what is flutter, how you can download and
setting up all you need to build and run your app and getting started with it, build your first android app.

What is Flutter?

Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in little amount of time.  If you are a beginner or developer you can learn it quickly. Flutter works with existing code, is used by developers and organizations around the world, and it is free and open source.

Designed for both new and experienced mobile developers, Flutter can help you build beautiful
and successful apps in record time with benefits such as:

High-velocity development

Expressive and flexible designs

High-quality experiences across devices and platforms

To learn more about visit flutter.io

Flutter uses the programming language called dart. have you ever heard about that language.
I have seen a video in youtube but I didnt intended to watch that. Now with this I am learning that language and it is easy to learn. In this series Im gonna teach you everything from beginner level to advace level in dart.

Anyway, Dart is a modern concise dynamic programming language and it has really cool feature. I'm not going to describee them in this video. Visit the www.dartlang.org website for more info.

And in the future I think this language will be a famous one because of google's new os fuchsia uses this language.

Before installing flutter, install these

git install . check if path set or not and install it as usually you do
android studio
android device connected to your machine or emulator installed and open in your machine.
You do not need to download emmulator if you have installed android Studio. Just run it.

Download and install Flutter

To download install both of these, you have to simple thing that is go to the website. copy the command from flutter.io it is easy to download and install not like installing android studio. make sure you have installed git otherwise this command will not work.

go to the directory, where you want to install flutter. Keep remember, if you have installed this inside windows/system32 you will get an error message when running some
commands(Flutter doctor)

gradlew assembleDebug - Failed to run the Flutter compiler. Exit code: 255

in case if you did this find the installation folder and move it to another location :D. You heard me right that is easy and this will be bad sometimes beacuse if you  accidently delete this folder your flutter installation will be disapear.  You do not need to do any unstallation.

Flutter SDK
The Flutter SDK includes Flutter’s engine, framework, widgets, tools, and a Dart SDK. So, You do not need to download or install dart.

set path variable - if you type flutter without setting the path variable you will get a message like

Go to installed flutter direcotory and bin directory inside it copy the path and set it to PATH environmental variable

open up the cmd type Flutter to ensure that installation path is correctly added.

basic commands are,

flutter doctor - is a really cool tool that check your system for dependencies see if their any remaining dependencies you need to install.

Now lets see flutter doctor command

lets open the IntelliJ IDEA and add those two plugin

Flutter create project_name - to create a project

flutter help - to see available tools

Flutter devices - this command help you to see what are the connected android devices and running emulators.

Flutter run - to run the project(this command should be run inside the project directory)

create and run your first flutter app

Flutter create demo

cd demo

Flutter devices

Flutter run
 (if you have a device connected this command will work otherwise a error message will appear)

Lets run this application using a emulator. First we need to create avd(Android Vertual Devices)
you can do this using Android Studio or using command line.

To create AVD

First go to the android sdk installed directory - tools - bin

then using cmd type

avdmanager create avd -n name -t targetID

target id - API level. Notice: Flutter runs above API level 16 and Android version 4.something above

emulator -list-avds - to list created emulators

emulator -avd name - to run a emulator

You can use

Android Studio
IntelliJ IDE
Atom Editor
Visual Studio Code
and etc.

view source code in IntelliJ. In upcoming videos I will show, how you can use other IDE's

Learn more:

flutter.io
medium.com/flutter-io
codelabs.developers.google.com
hackernoon.com/whats-revolutionary-about-flutter-946915b09514

In the next video I will show you how you can develop your first hello World app from scratch.

No comments:

Post a Comment