
How Does Flutter Work Under the Hood
Everything in Flutter is a Widget. The entire UI is built using widgets composed together. These widgets are powered by the Skia Graphics Library.
The Flutter framework uses the Skia Graphics Library to render everything. So at the lowest level, Flutter renders everything using canvas, paints and other primitives provided by Skia.
Flutter has two modes of rendering - Debug mode and Release mode. In Debug mode, Flutter rebuilds the widget tree on every save. In Release mode, the entire widget tree is rebuilt only if there are actual changes. This makes the hot reload very fast in Debug mode and the Release build very fast.
The layer tree is the render tree mapped to visual layers. Each layer corresponds to a surface where Skia can paint in. The layer tree is rendered using Skia.
Flutter's engine is powered by the Dart VM and Skia. So there are actually two threads - the UI thread which is running the Flutter framework and the Dart VM, and the Rendering thread which is handled by Skia.
When there are changes to the widget tree, the diffing algorithm figures out the minimal number of changes needed to go from one tree to the other. This algorithm is fast and efficient.
In order to achieve a native look, Flutter renders platform specific widgets under the hood. So a MaterialButton will render differently on Android and iOS to match the native platforms.
All the native integrations like accessing the camera, location, etc are achieved through Platform Channels that communicate with the host platform.
Flutter is bundled with a rich set of widgets, tools and libraries - like Material and Cupertino libraries, Hot Reload, Dart DevTools, etc.
Flutter apps can be compiled to native code so they have high performance. The entire Dart code is compiled to native ARM code, so there is no JavaScript bridge involved.
So in summary, Flutter renders everything using Skia, has
Appreciate the creator