first-flutter-app

Flutter – my first simple application

Flutter is actually fun!

Well, a few days after THIS post, with the help of Udemy, I’m ready with my first super-simple Flutter application and it’s on GitHub! It took me about 5 hours to create, having in mind the learning process.

To be honest, for someone like me who has no idea of UI design patterns, colors and item arrangement Flutter is pretty straight forward.

Landscape mode and a short video:

For my development IDE I decided to go with VS Code, simply because I find Android studio way too heavy, also Flutter and dart plugins are working without any issues on it.

First impressions:

As a complete Flutter beginner I can say that the process of creating an app is much easier than the usual native way (I developed few android apps using JAVA). It is also faster and more enjoyable, or at least in my case!

One thing that is confusing me though is the huge amount of widgets provided by Flutter. It’s cool to have them, don’t get me wrong, but they are countless possible ways of nesting combinations. Also having in mind the 100s of available widgets(some of them almost identical), it’s hard to remember all of them and the “right” ways of implementation. I believe that with more practice I will get rid of this feeling, but for a beginner like me it’s kind of confusing.

Dart is really nice to work with and it provides a lot of powerful utils and implementations that actually blew my mind. The syntax is standard, so if you are familiar with some of the modern programming languages, you should be good to go.

There is one thing that I don’t like, but I guess this is a design choice they had to make – it’s the fact that in your application you will need to pass a method reference to your child widgets.

This means that you are going to have your method in the main/home widget for example, so you could have access to let’s say a data object, and also you need to manage the widget states of this home widget(I’m already repeating widget…). But since we are talking about an application the main screen can be split into multiple widgets that are interacting together and in this case, you need to pass a pointer of your method to the separate widget so it can have access to the same function and manage the state of the main widget. And this looks right. I don’t think there is a better way to do this.

There is nothing wrong with pointers, but currently it’s super easy to get lost as it’s simply a pointer. It’s not treated as a function in the widget to which it’s passed by a reference. Even if you declare it as a function the widget can’t know if it’s expecting any variables. Anyway I believe that soon the IDE and the dart plugin will be smart enough to distinguish it.

Everything other than what I have noted above is simply perfect!

I have not worked with the application states yet, but this will be my next challenge.

I hope that you enjoyed this article, even if it feels incomplete, but as a beginner, with the knowledge I’ve gathered this is all I can currently write about. 🙂