The question of the widget

hrtval
3 min readSep 5, 2022

Good day everyone!

My name is Alex, I am the founder and frontend developer of the “Operator 18” management company automation system.

I wrote it using the Dart language and the Flutter framework, which allowed me to use a single code base for the web application and the iOS and Android mobile platforms at once.

I already wrote an article about the “Operator 18”. But then it was the first version of the project, I collected opinions, tried to evaluate the market, choose a monetization option, etc.

Now I am doing what is called rewriting the project from scratch. Taking into account the mistakes of the past, I want to rewrite the code, apply the architecture, structure the project better. In general, invest in development for the future.

In this and subsequent articles, I want to share my experience about the difficulties I face when rewriting from scratch and how I solve them. It’s good if someone finds something useful for themselves in my articles.

So, the first version of the project is here, but it looks so-so. To be more precise, there is no design, I assembled the interface from regular widgets, changing color and font size at maximum. In general, I didn’t bother much. There is no architecture either, but about this in the following articles.

For the second version, I decided to order a design.

I didn’t have any special requests or requirements. I wanted to see a simple and concise design, functional, if I may say so.

But, as you know, design is the creation of widgets, non — standard, custom. And at this point I was faced with a choice: to write my own widgets or to look for something that works with the functionality I need in the pub.

Initially, I was sure that I would write widgets myself, right from scratch. I thought it was not worth keeping a lot of third-party dependencies in the project! If you can write something yourself, write it!

Here, for example, the login window in the new design looks like this:

And I, having decided to listen to myself, did not look for ready-made solutions, but wrote my own widget:

For me, «my widget» is not just a button, for example, with which the color has been changed and the corners rounded. «My widget» is a widget that needs to be created to describe its behavior and reaction to user actions.

Anyway, it turned out well, maybe some animation is missing, but in general – I was satisfied!

As a beginner who does not have much experience in creating widgets, this process seemed time-consuming to me, because it is necessary to compose widgets, define all methods and parameters, and think about the logic of behavior. I realized that this, in general, is superfluous.

After that, I thought that absolutely custom solutions can be made if necessary. But in this case, it turned out that I invented the wheel.

I left this widget in the project, did not replace it with a boxed solution. Although in another place a similar widget looks like this:

Thanks for reading! I will be grateful for critics/advice/other comments.

--

--