My Thoughts About Flutter, The New Cross-Platform Framework

Coming from the web world, Flutter is the framework that changed my mind about mobile development! I believe that it is great and that it has a future full of promises!

Logo — Flutter

How it all started

After developing some websites and mobile app using Cordova, I got tired of HTML & CSS, I wanted something new, something that I had never tried in my entire life!

We could call it luck but not more than one month after the moment I started to look for something new, I started to work as a mobile developer for the University of Liège and I think that it won’t be a surprise for you anymore, we had to use Flutter!

In the beginning, I must say that I was not very confident about developing a complete mobile application using a new framework that was still in beta at the time, and Dart a Programming language that I never heard about.

But after using Flutter for more than a month I felt confident, Flutter was pure magic!

I loved everything about it!

What about the learning curve?

Well at the very beginning if you don’t have a clue about what mobile development is, I must say that you won’t understand a thing. But if you are patient enough, you will, in the end, be able to master Flutter.

After one-month of writing fake-app, you will start to truly understand how Flutter does work!

After three months you will stop using stack overflow all the time, it will even become the last thing that you do when encountering a problem.

After six months you will probably be able to write a simple app without even having to think, things will start to feel natural.

After a year you will be able to answer most of the questions on stack overflow! And you will probably feel confident about developing a serious project using Flutter.

Things that you should know before starting coding with Flutter.

Once you understand the basics of Flutter, nothing can stop you anymore. There are some points that you should know before starting coding:

Flutter uses its own rendering system, this implies that you can not use native widgets from iOS or Android. But Flutter comes with a pretty large set of like-native widgets! The advantage of that is that you can be sure to have the same design on old and new phones. State Management! That was the hardest thing for me to understand. Indeed State Management is a key concept in Flutter. The state of a widget is the current representation of the widget, if you change something of your interface without updating your widget’s state through the setState method, you won’t see any changes on your screen. Everything is a widget! I think that this may be the most important point. Everything that you see on the screen is a widget, even Routes are widget! Reusable widgets; with Flutter it’s pretty easy to create small components that you will reuse a lot! And making small widgets allows you to have better state management! Because calling setState at the top of the widget’s tree will be more expensive than calling it at the bottom of the tree! And that’s because calling setState will rebuild all the children of the current widget!

What I truly love about Flutter

The first thing that comes to my mind when writing this sentence is the fact that your code what you see, there is a single place fort logic and interface and it is in .dart files! You can then separate the logic from the interface in any way you want!

Then there is the hot reload! This is a functionality that will save you a lot of time! Instead of waiting for the app to recompile all the time, just press the hot reload button! After less than a second you will see the changes that you made in the code on your screen!

After that, there is the fact that Flutter is open source which means that you can take a look at what is behind the default widgets. This can help you a lot when learning Flutter, trust me :)

Another important thing is performances; Flutter offers close to native performances! You should not even see the difference!

The code is readable! So it is very easy to maintain a Flutter project!

And then of course Flutter is a cross-platform framework! Not only it is the same code for android or ios, but now it is also true for the desktop version and it is actually in development for the web! (Project hummingbird).

What I think could be improved

Well for me there is one thing that is not so great about Flutter, and that is the fact that there is not a real integration for native components in the widget’s tree. What that means is that while you can display and interact with native components through some plugins, they won’t be considered as a widget and that can be a real issue! (Native components are painted over the Flutter canvas…).

Then this is not directly about Flutter itself but more about how to learn Flutter! There is no real tutorial to learn Flutter from A to Z. There is the default tutorial on the official website and I must say lots of video on YouTube but I do think that it is not enough and that for now, a lot of people need to learn by themselves!

And finally, zero 3D support. :’(

Conclusion

Flutter is a great cross-platform framework that has a bright future! It is not too hard to learn if you have the motivation. It is also really powerful and flexible!

It can be used in production without any problem and if you want a solution that is at the same time the less time consuming possibly and very powerful, Flutter is your solution!