Journey with Flutter

Sai ambati
3 min readNov 23, 2019

Today,fortunately I gone through the Flutter.I just want to share my knowledge with you guys.As it is my first day i just gone through basics of the Flutter and done with first hello world app.

Let’s get started with why we should go for Flutter as a developer…

For developers,Flutter lowers the bar to entry for building mobile apps. It speeds up development of mobile apps and reduces the cost and complexity of app production across iOS and Android.

Developers who wants a faster way to build beautiful mobile apps, or a way to reach more users with a single investment.Flutter is easy to learn who have prior knowledge on object-oriented concepts (classes, methods, variables, etc) and imperative programming concepts (loops, conditionals, etc). No need of any mobile development experience.

I followed the flutter dev site to installation process and how to create the app
https://flutter.dev/docs/get-started/install

All the process went smooth,I used android studio as IDE and flutter SDK(which i was downloaded from flutter site). But I faced some problems while running the app in real device..I am mentioning those errors here so that if anyone facing the same issue they can resolve those issues easily.

Issues I faced for the first app run in real mobile device
1.I tried to see the connected device in studio,but we should execute the following command in terminal to see the device in the studio IDE
$ flutter devices

Some machines will get error like “Device is not authorized.You might need to check your device for an authorization dialog”. To resolve this error we should kill the adb server and restart the server by using the following steps.

  1. Unplug the connected the device
  2. Execute adb kill-server
  3. Execute adb start-server
  4. Connect the device again with USB

It will resolve that problem..Now you can see the device in the studio to run your first app.Make sure you set all the paths in PATH environment variable as mentioned in the installation steps.

Basics of Flutter :
Flutter uses dart as a programming language which itself is fairly easy to get started with and Dart language is neat,short and strongly typed objected oriented programming language.
Dart delivers high performance and predictable and it can be used as a cross platform language.Just in Time(compilation process) and hot reload(allows reloading the code on the running app without losing the state massively reducing development time),AOT (Ahead of Time-compiled to fast, predictable, native code) are essential features to the Dart.

In flutter,almost everything is widget.Widgets are the foundation of flutter apps ,the central idea is that you build your UI out of widgets, it describes how the view should like given their current configuration and state.

Widgets can be of two types either stateful or stateless.

Stateless widgets

A widget that does not require mutable state or in other words static widget . There are cases where you’ll create widgets that don’t need to manage any form of internal state.

They do not depend on any data change or any behavior change. For Example. Text, Icon, Raised Button are Stateless Widgets.

Stateful widgets

A widget that has mutable state or in other words dynamic widget . They allow us to create widgets which can dynamically change their content over time.They can be updated during run-time based on user action or data change. If a Widget can change its state during run time it will be stateful widget.
Example :Image,Form,Checkbox.

That’s it for now. I hope you learned something from my words.

If you like my article, please don’t forget to click 👏👏👏 to recommend it to others 👏👏👏.

--

--