First, response to some questions
Why aren’t you writing more recently?
No new articles have been published for about three months since November 2021. During the twists and turns, experienced demolition, decoration, moving, a lot of trivia pestered, the main energy of spare time are also put in this small volume. The book was finished before the end of the year, and it was a perfect ending to a quiet year for me.
What books about Flutter are available now?
Three books have been published that provide a systematic introduction to Flutter drawing, gesture, and animation. Now, add a new brother to the Flutter slide quest:
Painting module
: The Guide to Drawing Flutter – A Wonderful BookGestures module
: The Exploration of Flutter Gestures – The Whole WorldAnimation module
:Flutter Animation Exploration – Streamer PhantomFlutter slip exploration
:The Quest for Flutter Sliding – Better Fit
Will there be other volumes?
I have previously planned the whole of the Flutter knowledge system and expect to have a comprehensive understanding of the Flutter framework through 7 small volumes. Now four books have been completed, the follow-up content will be carried out, please look forward to ~
Will the previous volume be updated?
On the one hand, the version of Flutter is updated relatively quickly. When the first three books were written, air safety was not used. Or there may be some destructive updates to Flutter that cause problems with older versions and affect the use of the book. On the other hand, with my further study of Flutter, some new discoveries may be made or some optimizations may be made to the previous code implementation. Or some misspellings have personal understanding of the deviation. These need to update the contents of the booklet, and we will prepare for these updates at the next meeting.
Is it a good deal to price the booklet at such a low price? Will the price go up later?
I don’t write for a living, so I don’t care much about the benefits of words. By writing the pamphlet, I had the opportunity to systematically review all aspects of Flutter. The technical growth and harvest brought to me cannot be measured by money. Through my sharing, enabling more people to access or study Flutter is also a meaningful thing in itself. All seven books of the Flutter knowledge system are expected to be sold for 3.5 yuan, with no price increase.
Second, why choose to explore sliding system
The knowledge of sliding that we are exposed to in daily development is just the tip of the iceberg. Many people only understand the use of ListView, PageView and other components, and even NestScrollView and CustomScrollView are not good. I don’t know how to play with slivers. I didn’t have a very deep understanding of them at the beginning.
After understanding the structure and operation logic of the Flutter sliding system, we can understand the structure and purpose of these components from the perspective of the source code, so that we can use them in a higher dimension. When encountering an anomaly or a new requirement for sliding, you can look at the problem from a broader perspective than just scratching the surface. It is interesting to explore the source code to see how the author defines the structure of the class and how it deals with the relationships between classes. We may also be inspired by some brilliant logic treatments. When we can read the style they describe through the source code, the moment the finger slides the list, what you can see is no longer just the sliding of the viewport, but also how each object in the sliding mechanism meshed like a gear, driving the operation of the whole system.
Why did you choose sliding systems for the fourth volume
The sliding mechanism can be regarded as a connecting system to the framework layer. Up you can connect to the Widget layer of the sliding component, down you can connect to the Gesture layer and Animation layer. Knowledge of Rendering Rendering layers is also covered in viewports and Sliver content related implementations. Therefore, the exploration of the sliding system is chosen as the content of the fourth Book of Flutter.
In addition, but also a lot of friends want to in-depth understanding of the sliding system, but they do not understand the source code. I also wanted to know more about sliding systems, so I decided to explore them, document their progress and share them with you.
Iii. Brief introduction to the contents of this volume
The first part of the main purpose is to make a preliminary cognition of the composition of the viewport sliding, which will be through the source code analysis of the ListView, which is the most familiar to us, so as to lead to the deeper knowledge behind it, in order to gradually recognize the necessary components of the sliding body from the source code.
The second part is a preliminary understanding of Scrollable and Viewport, two sliding components. Mainly from the point of view of member attributes are introduced, and combined with the source code analysis, in order to have a general understanding of the sliding system, for the following exploration to lay a foundation.
The third part is the exploration of Sliver, first through the use of Sliver components, and then from the perspective of rendering objects to analyze the necessity of the existence of Sliver components. It also includes the exploration of cache implementation and keepAlive mechanism.
The last part is an exploration of the sliding processing mechanism. In the beginning, the source code implementation of PageView and SingleChildScrollView components was carried out, and then the Notification Notification mechanism was introduced. Finally, the callback processing of drag events in ScrollableState was analyzed with the foundation of the previous knowledge.
I have gained a lot from my exploration of the source code of Flutter sliding system. I also hope that what I see in my eyes can be conveyed to more people through this small volume. Thank you for your continued support