The year 2020 has come to an end, but it is time to look back. We have experienced, explored, and harvested much in this year. Basically, the whole year revolves around a theme of Flutter. This article will summarize the course of this year from the aspects of FlutterUnit project, this year’s works, my Flutter group, this year’s growth and emotions, and give a brief look at 2021.


First, go for itFlutterUnit

The open source project that dominated my spare time this year was FlutterUnit. I started open source on April 15, 2020. Now I have submitted 142 times, recording my dribs and dribs in the past eight months. With constant updates, FlutterUnit is getting stronger and stronger. Added a hover button across the app for easy operation, increased the bottom bar to four keys, and added a drawing collection and personal page.

Suspend button The third page The fourth page

1. Behind the scenes of the FlutterUnit component collection

From 213 to 306, FlutterUnit is now a true Widget dictionary. I typed every explanation, every introduction, every code. I admire my endurance more than my skill.

DragTarget GridTile Flex

In fact, the most important thing is not to have children, but to raise children. Open source projects, too, can only grow if they can be maintained. In FlutterUnit, the maintenance of component information is particularly important. For example, there is a typo or information that needs to be corrected, a new component needs to be added, or an introduction node needs to be added to a component. If the operation is performed manually and visually, it is very troublesome, which increases the maintenance time cost. The safeguard that FlutterUnit can maintain is a parsing tool I customized for it. As the saying goes: Only magic can defeat magic.

In the Widgets package in your project, are all the widgets that are indexed. In the case of ListWheelViewport, there are four files in it, which means there are four introduction nodes in the component details. Each node has a text in the red box that describes the node information. It then iterates through the files in all widgets packages, parses the contents of the red box through a NodeParser parser, and synchronizes the information to the database. To add a node, write a node_xxx file. To add a component, add it to the Widgets package. This ensures that FlutterUnit can maintain updates.

Although the copywriting and component code must be written yourself, this has the added benefit of being solicitable. This should be a practical application of the interface. You don’t need to understand the inner workings of FlutterUnit, just give a demo that follows the interface format in the red box, and your demo components will be included in FlutterUnit. In this way, the extensibility of FlutterUnit can be enhanced. Anyone can simply join the collection of FlutterUnit and jointly maintain it, which is the original intention of FlutterUnit. However, so far, I have been working on it all by myself. Now the whole component system is basically perfect. You can also contribute introduction nodes to the included components to enrich FlutterUnit. You can provide component demo code by pr or issue. The goal of FlutterUnit is the sea of stars, which will always be pushed forward, whether by thousands of people or me alone.


2. Promotion of FlutterUnit’s drawing collection

If you follow the development of FlutterUnit, you will find that the bottom navigation bar has been upgraded from two keys to four keys. The second key is the catalogue page of Flutter drawing, which contains five classifications of Flutter drawing works. It can be said that the progress of this collection catalyzed the creation of a small book called The Guide to Flutter Drawing – A Wonderful Book of Flowers. More on this book later.

The gallery classification Click to enter Switch the paintings

The main purpose of these paintings is to provide practice materials and examples for people who like to draw or want to learn how to draw. It also shows that Flutter is not inferior to other platforms or frameworks in terms of drawing, and that your previous drawing skills will still be valuable.

1 2 3

Some works of art will also be included, using Flutter drawings. See the infinite possibilities of Flutter drawing.

1 2 3

At present, the drawing collection is still in the testing stage, with fewer works included, which will be gradually improved. If you want a good drawing, you can also send the code to me via PR or issue. If I think it is good, your name will be displayed on the Page of The FlutterUnit Drawing Collection together with your work.


3. Advance FlutterUnit on the desktop

Since SQFlite already supports Windows, there is no need for Flutter_unit_Windows, the desktop side is unified and the branch is renamed to Flutter_unit_desk.

At present Windows, MaocOS use the same set of code implementation, later maintenance is convenient. At present, 306 desktop components have been synchronized. You can download the experience from The GitHub page of FlutterUnit. Currently FlutterUnit’s focus is on mobile, so desktop updates aren’t that frequent, but it’s still good enough to be a dictionary.

Many of you may wonder why I’m so obsessed with the FlutterUnit open source project. Doesn’t it smell good when I sleep? There’s a lot of growth to be gained from maintaining an open source project and carving out a niche for myself, but overall I don’t have much to offer. I’ve always had FlutterUnit as my first business card. Second, as a perfectionist, it’s frustrating not to have a complete guide. So widgets to me are a collection of cards with different functions. This may not matter to many people, as long as they know the widgets they use. That’s true, just like you don’t have to memorize the whole dictionary, but it’s reassuring to have it there. There is another purpose: to do what we can for the spread of Flutter.


2. 2020’s two big hits

1. The Journey of Flutter

This book can be said to be very difficult to write, in the process of writing this book, I have a comprehensive understanding of Flutter. It was June 2019, and an editor at The China Machine Press contacted me about my interest in writing a book about Flutter. This is a great opportunity for me. There was only one book on Flutter, and it was a very simple one. At that time, many people’s cognition of Flutter was very one-sided. I think I can explain Flutter in a deeper and more comprehensive way. In addition, I like to read the source code, and I can use a chapter to describe the rendering mechanism of Flutter framework. So I didn’t hesitate. I just said yes.

Since Flutter is a UI framework, it was decided to be a palette from the start. However, I originally intended to write a story about the hero’s adventure in the Flutter world, with certain characters, plot, dialogue and scenes. Mainly set a world, the protagonist Jet to the newly discovered Flutter cave exploration story, the protagonist uses his previous knowledge, from the unknown to gradually understand the Flutter world. Here the components are personified, and each component is a character that triggers the plot and explains the knowledge in sequence. It took about six months, over 400 pages. but

This plan was not approved. First, the style was too active, mixed with a lot of plot dialogue and background introduction, resulting in unclear key points of knowledge, which was not suitable for publication. Second: too many irrelevant elements, resulting in too much page number, color plate printing cost problems. After I see, also feel fancy, maybe some people will like this, but more likely will be disgusted, knowledge did not introduce good, the plot is not so. In addition, I have had a deeper understanding of Flutter in the past half year, and I am not quite satisfied with the previous ones. In the middle of the day, make a quick decision and change!

That very day, as I was writing an impassioned rewriting of the preface, my Mac’s hard drive died. Then, after writing the rant, he completely disappeared into the world. Fortunately, I’m backup conscious and everything important is backed up in the cloud. The feeling at the time was that this was a sign of a new beginning, a new life for the book. So spent half a month, take its essence, discard its dregs. Free this book from its ineptitude. The book was eventually cut down to 274 pages, and I left out some of the less important stuff. I don’t want to write about Flutter in a book. It’s a waste of space. This book only cares about the usage and content of Flutter itself, the sub-related stuff is undertaken by FlutterUnit.


2. The Relationship between Flutter Journey and FlutterUnit

FlutterUnit was developed before The Journey of Flutter, but it progressed very slowly, just trying to beat magic with magic and demonstrate Flutter with Flutter. However, at that time, the understanding of Flutter was not that deep. FlutterUnit was also a demo of its own and was not open source. However, through the creation process of Flutter Journey, I have a more comprehensive understanding of Flutter, which to a large extent catalyzes the open source process of FlutterUnit. Since I am writing a book, I must have a deeper understanding of Flutter. It was this idea that led me to test the widgets of Flutter, which was the original material of FlutterUnit.

Due to the limited content of the book, it is impossible to cover all the widgets. Therefore, the book only introduces some commonly used widgets and explains how to recognize them. This has always been my problem, and I tried to make up for it through FlutterUnit. But as far as FlutterUnit is concerned, it’s my personal open source act and is open to anyone, just in passing as a supplement to Flutter Journeys. The goal of FlutterUnit is to create a complete and mature application for Flutter enthusiasts.


3. Difficulties and Gains in writing The Journey of Flutter

The journey of Flutter was originally written based on V1.7.8. As the process went on, the SDK of Flutter was gradually updated to V1.9.1. The final version was v1.9.1+hotfix. There are also some changes in the source code, the Android side of the plug-in code has changed a lot. Because the chapters in the book involve the analysis of Flutter source code and the implementation of the Flutter platform plug-in content. So I wanted to update it to V1.12.13, which would have been a hassle for editors, but eventually I changed it and published it based on v1.12.13+hotfix. I dropped all the source code in the book in version 1.12.13. A few weeks before publication, 1.17 removed the State#build method callback for routing stack returns. At this time, the book is basically finalized, the editor’s meaning is: nothing is perfect, the pursuit of perfection is endless, a year later, you will still find a lot of deficiencies. As long as they feel worthy of the present line. As such, the version remains in V1.12.13 +hotfix.8 with an explanatory note where relevant.

To write this book, I tuned the logic of the Flutter framework layer n times, exploring the Flutter rendering mechanism with various questions. What trees are in Flutter, what is the logic of tree formation, what are the root nodes of various trees, when they are initialized, what relationships exist between them, what State is, and what exactly it does. As a result, the veil of widgets, elements and RenderObjects is gradually lifted, and Flutter becomes a different world in my eyes. By writing this book, I have completed the sublimation of my understanding of Flutter and laid a solid foundation for the following things. Then I dare to say: Flutter, I have entered. It has been nearly half a year since the book was published. Because the price of color board is relatively expensive, I feel that there is no publicity from the publishing house, and the sales volume is really poor. I don’t really care about sales, but writing this book has become what I am. Now I have a better understanding of Flutter. Due to the limitations of cognition at that time, some parts of Flutter were not well handled in the book, which was also the great limitation of paper books that could not be updated in time. Even so, the book is exciting enough for the novice to learn about the full world of Flutter.


4. The Guide to Drawing Flutter – A Wonderful Book

This is my first gold digger book. It consists of 20 sections and provides a comprehensive introduction to Flutter drawing. So far 1,600 people have bought it, which is very satisfying to me because it’s Flutter and it’s about drawing. There is no need to talk about the contents of the little book here. The man came with the little book, the guide to Flutter Drawing. Here’s the behind-the-scenes and the sidelights.

I was actually going to write a free drawing series for this column. However, I found that V5 could create a small volume by myself, and the drawing system was just placed in a small volume, so that there was no need to add a batch of links at the beginning of each article, and the volume was more complete and systematic. And writing a little book is kind of my dream in Denver. At that time it should be February or March, I think highly of myself, I plan to finish writing on March 28 and release it at the price of 3.28, summarizing my best fields as my birthday gift, which can be called perfect. Unexpectedly, I was embarrassed after writing a few articles. I felt that my cognition of Flutter drawing was still limited, and there was a bottleneck that had bothered me for a long time. In addition, I was busy with my work at that time, so I put more emphasis on my work. Therefore, this booklet ran aground. I forgot the existence of this booklet for a long time.

1 2 3

My spare time was mostly spent correcting errors in Flutter Journey and maintaining the FlutterUnit project. My work was a double day off, so I had a lot of time to study something, which I would go through a period of emotional twists and turns and depravity, which I will talk about at the end. Then there is just a need to draw the needs of the work, this is like a duck to water, the east wind, continue to write a small volume of time less than half a month. I was going to take my time and finish it in two months, but when I felt it, I couldn’t stop. By reading the code drawn in the source code of Flutter, MANY of my doubts were solved and I found that there were problems with the drawing method. Breaking the bottleneck strengthened my confidence in writing this book. This volume is also an account of my own, I entered the nuggets because of the Android drawing started, this is a satisfactory answer to their own paper. The most convenient part of the small book is that it is very convenient to modify, mistakes can be corrected in time, there are supplementary content can be added at any time, and you can put GIF, much more flexible than the physical book.


Iii. Holy Land of Programming Technology exchange -Flutter Group –

First of all, thanks to the group of partners for my capricious tolerance. The group rule of Wednesday English Day has been maintained from May to now, I think it is not easy. I come across as a stern person in the group. I created this group to share and discuss Flutter knowledge, not to answer questions. After a year of observation, many people still ask how to save the children whenever they have problems. Some simple problems can be completely solved by searching, and then they will be detested by me. I know this may not be very friendly to some new people, but groups have to have rules, or they lose their meaning by asking questions about everything.

Wednesday Direct seeding The resistance of the oppressed

One thing I like is that the person who asked the question did a good job of stating their question completely before asking it. Add your own insight into the problem and what you’ve tried to do to solve it, and provide a working main.dart file that gives the code. That’s the discussion, that’s the exchange, that’s the value of the questions, not just you asking and me answering. Other than making me stronger, it doesn’t make you any better. Except for a few iron fans who occasionally share profiles, we have been ignoring my pains. Thank Alex for his contribution to answering questions from the only authenticated troll in the group. In addition, occasionally in the group to do some source code interpretation of live text and text, feeling pure hi, group member participation is very low, but also one of the characteristics of the group, found what small points, I will also share in the group.

In addition, in bilibilii I have a live broadcast room, called source code between. But broadcast three times, mainly is to take a group of friends to see the source of the component. I’m good at writing, but I’m really bad at speaking, even with my voice, and I feel shy and have no talent for improvisation. I’ll do some live streaming later to practice my mouth. You also can listen to my recitation in bi Li bi li, saying is to want to leave the voice when the most beautiful time, but the thing is much, secondary thing can be stranded, ah ~


Four, MY growth

1. Growth at work

Writing books, writing articles, and reading through the Flutter framework are all theoretical growth, although these are also very important. But growth at work is the most precious and urgent thing for me. At the end of 2019, I was in charge of the development of a Flutter desktop project. I was one of the early adopters of the Flutter desktop. One year has witnessed the step by step development of the Flutter desktop, and the project has been gradually improved. However, there is still a certain gap to complete, but it has definitely gone beyond your current awareness of the Flutter desktop support. Due to the practical experience of work and the theoretical experience of writing, I have a deeper understanding of Flutter, which is extremely valuable to me. I will continue to explore the use of Flutter in the future, focusing more on performance, and will continue to post articles on the dry stuff.


2. My life

I don’t write code all the time. I play games, watch anime, and watch movies. I only like to play card strategy games. I have no interest in King of Glory, eating chicken, or big games on the computer. I like hearthstone, but now I just play Onmyoji on mobile. It’s easy to watch three movies a day or a dozen episodes a day, but I have the ability to code while watching. When the sun is shining, I like reading and drawing. After all, I still have a world to express, and I am not able to describe it. During the period of severe epidemic, I became even more indoorsy. I thought I was the kind of person who would not gain weight no matter how much I ate, but the fact proved that I was not, so the word exercise came into my life. Most gratifying of all, my hair is still healthy, with no signs of crazy hair loss.


3. Put an end to a relationship

If 2020 has one regret, it’s that she couldn’t keep her in the end. After the book was published, the publisher gave me six complimentary sample copies. I saw her one last time as a book delivery, and she agreed. We hadn’t seen each other for a year and a half, but the appointment was as usual. We seemed to be the same people we were two years ago, without any strangeness and violation. Eating, shopping, walking, chatting, walking through the parks we used to walk through. On the bus back home, she lay on my shoulder with her eyes closed and asked me to give her the numbers in her head. This girl is engaged, love or not is not so important at this time, I just know her and I have entered the countdown, this is our last moment. After the last hug, I took the bow from her head and that’s how we parted forever. Now that she’s a wife, I’ve seen the world. After this, I began to settle down and decided to continue writing the Guide to Flutter Drawing – A Wonderful Book. It was completed very quickly, not surprisingly. Maybe women only affect how fast I type code…


Iv. Prospects for 2021

  • Do your job, continue to gain experience, and do your job.
  • maintenanceFlutterUnitOpen source projects, rich content. The desktop UI is still a bit ugly.
  • Continue the in-depth study of Flutter, focusing on the energy aspects, optimizing the current development projects andFlutterUnit.
  • Maintain the output of nuggets columns and provide high quality articles. I might even write a little book.
  • Read more source code, practice English, the ideological level of things summed up.
  • In terms of audio and video, if you have time to pick it up, it might be useful.
  • Set some weekends at B station open live, look at the source code. Read more poems and leave a voice behind.

@Zhang FengJieteilie 2020.12.21 My public account: King of Programming contact me — email :[email protected] — wechat :zdl1994328 ~ END ~