Introduction to Flutter

Introduction to Flutter

Best toolkit for cross platform development

ยท

3 min read

Suppose Areen is an iOS developer and he develops an app that is loved by everyone and everyone's downloading it from the app store. But lately, Areen had been receiving complaints about the app not being on android. Then Areen started learning Android Development and made the same app as the iOS one and launched it on Google Play Store. Now that's very good for everyone except for Areen because whenever Areen has to make some changes or bug fixes in the app, he has to maintain 2 fully different codebases and do the process twice. On the other half, Android is an Open Source platform and the sizes of screens may differ a lot if we compare it to iOS devices so it isn't compatible with all types of mobiles. This is where Flutter comes in.

What is Flutter?

It is a toolkit used by developers for designing beautiful User Interfaces for all kinds of screen sizes and devices. It comes with a whole bunch of pre-built widgets that are used to lay out your app. The way ten thousand bricks built a house. In the same way, an app can be built by using widgets.

Why learn Flutter?

Creating apps natively like developing your Android Apps in Java/Kotlin, iOS Apps in Swift and Web Apps in Javascript.

What if I tell you that you need to learn only 1 language and you can deploy apps of all 3 kinds?

Yeah, that's true and i.e. Dart. Also, it has a single codebase which is why it is the best because it gives us the benefit of updating and debugging our apps on a single platform.

As Flutter is Open Source we can select any button inside our codebase and see the original code which was created by developers.

Suppose you want to build your button(say) you can take the original code and make changes inside and make your version, which is pretty cool.

On top of creating Android and iOS Apps, we will soon be able to use hummingbirds to make web apps by using dart code and Desktop Apps too.

What does a Flutter App consist of?

Scaffold - Just a blank screen.

Toolbar - It is located at the top.

Container - Just a box, it's gonna contain the content of my app.

Column, Row, Text, Image, Icon - Built inside container. (basically designing)

How does Flutter create Apps?

  1. Natively

The native method includes creating Android apps using Java or Kotlin, iOS apps using Swift or Xcode, Web apps using HTML CSS JS.

  1. Hybrid (Cross-Platform)

So basically Flutter falls under the Hybrid class of making apps, it also includes frameworks such as Xamarin, Cordova, Ionic and React Native.

How Flutter is different from other hybrid frameworks?

  • It uses Dart.

  • JIT(Just In Time) Compilation - Faster compilation during development.

  • AOT(Ahead of Time) Compilation - Runs your app faster with good experience.

  • JIT is helpful for developers and AOT for users.

Why choose cross-platform instead of creating native apps?

  • It has only 1 code base.

  • Support both platforms.

  • Better performance and integration.


ย