I’ll do you one better, why is Flutter?

Julian Spinelli
BeeReal
Published in
6 min readOct 9, 2019

I’m sure you have heard about Flutter, one of the multiple Google’s babies and you are probably considering developing your own app. If not, you may be a curious programmer, or manager or someone in a fancy-name job position. Anyway, I applaud your curiosity.

In this article, I will try to the best of my abilities to explain what Flutter is, its current main target of use and some considerations to take into account if you are ready to take the first steps.

What does Flutter bring to the table?

First, let us start with the basics: what is Flutter? According to the webpage… wait, let’s not do the cliché of showing the definition and then saying “but what does it mean”, and let us explain it from the get-go. Flutter is a framework that provides you with the tools to build applications for IOs and Android with the same codebase (you can export the same project to both platforms with very few changes), and on top of that it gives you access to a wide list of “widgets” which are already built and highly customizable UI elements with which you can build the entire app. Here for those of you that need proof.

On top of that, Flutter has the option to run native code apart from Dart, the one Flutter uses. This is code that is exclusive to IOs or Android (like Swift and Kotlin) and that is needed to access functionalities exclusive to those platforms (a great example of this is the Health Kit API on IOs), which means that you are not restricted to Flutter’s environment. Of course, running native code comes at the cost of jumping through some hoops, but in fact, there are few cases in which you will need these native functionalities and, if you are lucky, there may already be a library available that jumps through those hoops for you.

Moreover, the Flutter SDK has the option to Hot Reload your app, allowing for a fast review of the changes made in the code,this means you will not have to wait for the app to rebuild to see if the button moved the 2 pixels you wanted or, even worse, to see no changes and then realizing you modified the wrong line (I may or may not be drawing from personal experience).

Now that we have finished reading the Flutter.io landing page, we can discuss how Flutter actually works and some lesser-known aspects. This new platform (I consider it to be a teen in tech years since it was created 3 years ago) gives its users some other less known functionalities. One that I personally like is that it is IDE agnostic, this means that it doesn’t force you to use some specific IDE. You can simply run all your test through the Flutter console, however, is obviously a plus to use an IDE that supports Flutter’s and Dart’s syntax such as Visual Code and IntelliJ. Another bonus, that you may have noticed in the previous sentence, is that Flutter uses Dart as a programming language which means that you gain access to all the creature comforts a relatively new programming language has, such as a Spread Operator (‘…’), the ‘??=’assignment operator or String Interpolation, just to name a few.

But if the decision was this easy, there would be no need for me to write this article, wouldn’t it? For all of Flutters Pros, some Cons may burst the fantastic bubble of perfection. Flutter does not run on native code; it has its own engine in charge of drawing everything on the screen at a constant 60 FPS. This means that every time you change the state of a Widget, it triggers a redraw of everything below that widget’s tree and if it is not properly coded it may end in a whole screen redrawn from a simple text change. The cunning among you would say “get gud at coding” but, and there is always a but, there is a limit on how much optimization can be done to the code. Due to how Flutter offers its widgets, sometimes you are limited to how much you can restrict Flutter’s redrawing. For further proof of the limits of optimization versus native code, here is the pudding.

Now that we are in the business of drawbacks we can discuss a few other caveats that you should take into account but that, in my opinion, should not be a dealbreaker. As I said earlier, Flutter is still a teenager. This means that it is still discovering how its body works and which its capabilities are. If you are thinking of using Flutter in a big project, you will probably need to reinvent the wheel a few times because there is a non-zero probability that some libraries will be missing. All things considered, libraries do not grow on trees and someone has to make them and the option of creating the first libraries that provide some new functionality can be enticing to some.

This problem of being young leads to the problem of a small community. However, if everyone thinks that using certain technology is worthless because of its small community, then the community will not grow. As a consequence, we face a vicious cycle. I understand that sometimes a company cannot afford the luxury to use a technology without the support of a community, but I find it kind of ironic that this argument sometimes coexists with a “move fast and break things” mentality.

Lastly, a small issue, that will probably be fixed in the future but that still exists at the time of writing, is that the error reporting console is a mess. Whenever something throws an error, it gets printed into the console but it is then followed by a few dozens of lines that do not really add anything of value to the crash. This leads to a few seconds of scrolling through the console to find what went wrong.

But enough with functionalities and complaining. You are probably tired of reading the same rankings of functionalities over and over and you want some advice. In case you want some more information, you have these two articles here and here.

So…when do I use Flutter?

In the beginning, I promised something along the lines of “What is Flutter’s target of use” and if you didn’t skip until here, you probably can piece it together. But I’m already writing this, so let’s talk about it. Due to Flutter being in its teenage years, it hasn’t discovered how to do things faster yet. It still has problems because of its rebellious ways of solving things, but these rebellious ways are very promising alternatives to us, rebellious developers. Don’t worry! I’m not going to run this metaphor aground, it ends here.

If you are in the market for a platform that provides you with tools to make a high-performance application such as Games, you are going to struggle with Flutter’s current options of optimization and I do not know why you are reading this, you really should be researching game engines or read this. On the other hand, if you want to make an idea a reality and rapidly upload it to both platforms, I encourage you to try Flutter. It will give you the tools to make an easy prototype with a smooth learning curve and you will always have the option of going native later in the game when you know your app has potential because people are already using it.

All things said and done (mostly written and shown), Flutter is a very promising alternative to app development, one that should be taken seriously as a possible game-changer in the industry. I doubt that building a Facebook-size app with Flutter is the best idea right now, but there are very few Facebook-size apps and I think the Flutter platform is mainly targeted at small software companies or individuals that just need something done that looks pretty.

--

--