DEV Community

Cover image for Flutter - Most Trending Framework for Mobile Development
Gurshehzad Singh
Gurshehzad Singh

Posted on

Flutter - Most Trending Framework for Mobile Development

When it comes to app development, it can be difficult to find a compromise between quality and productivity: either developers have to build the same application twice on both iOS and Android, or they have to settle for a cross-platform solution that makes it difficult to deliver the native experience that customers demand.

And here comes Flutter – an SDK that is making headlines these days in the mobile development space. Its creators say that Flutter offers a new path for mobile development, focused foremost on native performance, advanced visuals, and dramatically improving developer velocity and productivity. It has already been adopted by some of the most famous companies such as Alibaba, Google Ads, Birch Finance, App Tree, Hamilton Musical and many more.

So, let’s try to understand what Flutter is and what makes it so popular.

Flutter is an app SDK for building high-performance, high-fidelity apps for iOS, Android, and web from a single codebase.

It enables developers to deliver high-performance apps that feel natural on different platforms.

For example, it is one of demo apps from the Flutter Gallery, a collection of Flutter sample apps you can run right after installing Flutter and setting up your environment.

Alt Text

This app – Shrine – has high-quality scrolling images, interactive cards, buttons, dropdown lists, and a shopping cart page. Not bad. But let’s slice and dice it all.

So, what is definitely good about Flutter?

Here are some points why Flutter might become the next big thing:

1.Building Android + iOS apps at once

As Flutter uses the same code base, you do not need to write any individual code for both the platforms. Ok, but this is similar to any cross-platform thing. Next, please.

2.Quick Performance and No Compatibility Issues

Unlike ReactNative, NativeScript or Ionic Flutter doesn’t require a JavaScript bridge to talk to OEM widgets. Flutter works more like a gaming engine. All the buttons, text, media stuff are being built inside Flutter’s engine. And this gives the application an additional performance boost. And that sounds interesting.

3.High-Speed Coding and Prototype development

Make a change in the app and see them in the blink of an eye. What can be better? All thanks to Hot-Reload. If you’re only changing the state of the existing app structure then you can see your changes in under one second by using Hot Reload. If you changed the app structure by adding or removing individual components, or even large sections of your app, that takes a little longer… 6-8 seconds under most conditions. Great, isn’t it?

4.A Perfect Choice for Advanced UI

Flutter renders all parts of the interface using internal graphics engine called Skia – the same that is used in Google Chrome, Mozilla Firefox, and Sublime Text 3. This fast and well-optimized piece of software allows Flutter to behave differently than most of the other mobile development frameworks. Cool!

5.DART Language

Flutter uses Dart – a client-optimized programming language for apps on multiple platforms. One of the greatest advantages here is that Dart code can be compiled in three different ways:

The first is truly native, Ahead Of Time (AOT) compiled machine code executable that requires no interpretation. And you can compile executables not only for Android and iOS, but for Windows, Mac, and Linux, too. But, of course, you’ll need to compile once for each individual platform, since each uses a different kind of executable.
Second, Dart can be Just in Time (JIT) compiled. And here we have this “Hot-Reload” that was mentioned above.
Third, Dart can be compiled in a way that results in JavaScript. This allows Flutter to do something truly amazing. It lets you put the same app you wrote for mobile and desktop into a web browser.

6.Fuchsia

It is an open-source operating system currently being spearheaded by Google. It uses a micro-kernel called Zircon, and is designed to be able to run everything from the simplest picture frame up through the most bleeding-edge mobile devices. Why is it mentioned here? Simple. Firstly, Flutter drives the UI for the entire Fuchsia operating system. Secondly, this means you will be able to use Flutter to write apps for all kinds of IoT devices, from refrigerators to alarm clocks, and more.

More information about practical use of some of these things you could find in this article of an Android developer who is sharing his thoughts on Flutter after having rebuilt his app from Java to Dart. Here I only mention the number of files/code-lines before the rebuilding (for the app built on Java) – 179/12176, and after it (for the app rebuilt on Dart) – 31/1735. As you see, numbers speak for themselves.

Drawbacks?

As usual, there are some things you should be ready for if going with Flutter:

1.Learning DART Language

As all the Flutter apps are written in Dart, you should understand that there is no way to escape this language if you’re considering Flutter to build your app on. Still, this reactive language looks familiar if you have worked with languages like Java or JavaScript. And the experience with object-oriented languages will be helpful as well. Still, you will definitely have to spend some time understanding all the syntactical sugar.

2.Everything in Flutter is a Widget

The layouts are widgets, the typography is a widget, color is a widget, button is a widget. Even the app itself is a complete widget. And this might take some time getting used to.

It is not intuitive for anyone getting started, to think that “widgetly” :). It might take you up to a month to get comfortable with Flutter. Adding margins, paddings and other attributes is not intuitive at first. Also, you’ll need to spend some time understanding Box constraints.

However, once you get there, you’ll see that it was totally worth the pain.

3.A bigger APK size

Don’t be surprised if you see your fresh-out-of-the-oven flutter app is bigger in size than its native counterpart by 50-60%. As the flutter-made apps are used with built-in widgets and not platform widgets, their size seems to be usually large. Currently, the smallest possible app which can be made using Flutter can’t weigh less than 4MB.

4.Flutter is not an operating system

This means it does not have direct access to things like cameras, Bluetooth, GPS and other hardware. So if your app communicates with any hardware via Bluetooth, for example, then you’d have to develop these features separately for iOS and Android and integrate them into flutter afterwards. In this case, one of the major selling points of cross-platform development (i.e. time), won’t be much beneficial as you’d end up spending time creating these features natively for both the apps.

5.Flutter does not have a very large support community

Flutter is still relatively new and does not have a community as large as other cross-platform solutions such as React Native or pure native apps, so it will need some time to grow the network of supporters.

So if you are someone who is afraid of documentation (still, cannot but mention that Flutter documentation is really good) this point might become a drawback to you.

Concluding

So, as far as there’s no other templating dialect for the time being that allows you to construct your UI by setting widgets, Flutter looks very interesting indeed. Of course, it might initially seem difficult, but later on, it does reduce the amount of coding, saves time, and looks better, all thanks to the power of widget support.

Flutter makes it easy to develop higher-performing mobile applications. This SDK further guides you with logic, reactive development, and composition. Moving ahead, this pays profits as your application becomes bigger.

Also the one should keep in mind the advantages of Dart language that can increase productivity in times. You can release your app to six platforms while needing only one team to write the code. Also think about what it would mean if you only had to worry about maintaining one code-base, instead of six. Still, you (or your team) will definitely spend some extra-time to learn Dart.

However, no matter what technology is used, cross-platform apps are still way behind native apps in terms of performance. So if you have the budget to setup two different teams for iOS and Android, we believe you should consider going native.

On the other hand, with Flutter you will get your app faster, and faster development saves you money (what is good anyway), and allows to validate your idea quicker.

So regardless of the number of individuals in your group or what your objective is, Flutter is a good alternative at least to try. So take a stab at coding DART for some time and check whether you like it.

Thanks for reading!

Top comments (2)

Collapse
 
103221 profile image
103221

Thank you very much for this TL;DR to Flutter! I really love it, very neat and comprehensible. And it's really true that Flutter is more of an economic solution but I believe that Flutter apps can perform not worse than the native one. If we take for example some Flutter apps, say, from here: surf.dev/flutter-apps-showcase/, they are quite popular and it doesn't seems like Flutter vs Native matters for the customers.

Collapse
 
fredgrott profile image
Info Comment hidden by post author - thread only accessible via permalink
Fred Grott

you are wrong we flutter app devs do not have to redesign a flutter app to native android and ios to get access to native hardware functions! heck, that was one of the points of the whole framework in the first place!

Update your info!

Some comments have been hidden by the post's author - find out more