Sitemap
Flutter Community

Articles and Stories from the Flutter Community

Follow publication

The Layer Cake

10 min readDec 21, 2018

--

The Four Layers

The different layers of the Flutter framework. For more detail on this, head over to https://flutter.io/docs/resources/technical-overview

1. The dart:ui library

2. The rendering library

3. The widgets library

4. The Material & Cupertino library

Putting it all Together

In the real world widgets like Text are composed out of many other widgets. To keep things simple, we introduce the phantasmal SimpleContainer and SimpleText.
A forest of trees. Back to the roots of abstract infographics!

Computing the Next Frame

Change the container color to red. Nothing special here.
The state of the three trees after rebuilding the widget tree and updating the config of the RenderObjects. Notice that the Element and RenderObjects are still the same instances.
The SimpleText got replaced by a SimpleButton.
The new widget tree. SimpleText, the corresponding Element and SimpleTextRender have been removed from the trees.
The final trees.

Conclusion

--

--

Flutter Community
Flutter Community

Published in Flutter Community

Articles and Stories from the Flutter Community

Frederik Schweiger
Frederik Schweiger

Written by Frederik Schweiger

Freelance developer who is in love with Flutter.

Responses (25)