FlutterFlutter · Chapterبەش 4 · Lectureوانە 4.2
How Flutter Is Built: Framework, Engine, EmbedderFlutter چۆن دروست کراوە: فرەیموۆرک، بزوێنەر، Embedder
Flutter's layered architecture: the embedder for each operating system, the C++ engine with its Impeller renderer (Skia only on the web), and the Dart framework with its five levels; open source; widgets, elements and render objects; and how one tap becomes a new frame.
تەلارسازیی چەندچینی : Embedder بۆ هەر ، بزوێنەرە C++ـەکە لەگەڵ وێناکەری Impeller (لەسەر وێب تەنها Skia) و بە پێنج ئاستەکەیەوە؛ ؛ ، Elementـەکان و ؛ و چۆن یەک پەنجەلێدان دەبێتە وێنەیەکی نوێی شاشە.
What you will learnچی فێر دەبیت
- Name Flutter's three main layers, their languages and their jobs.
- Explain what an embedder does and which language each platform's embedder uses.
- Describe the engine's jobs and why Impeller replaced Skia on mobile and desktop.
- List the framework's five levels from foundation to Material and Cupertino.
- Tell widgets, elements and render objects apart, and trace a tap to a new frame.
- سێ سەرەکییەکەی ، زمانەکانیان و ئەرکەکانیان ناو ببەیت.
- ڕوونی بکەیتەوە Embedder چی دەکات و Embedderـی هەر چ زمانێک بەکار دەهێنێت.
- ئەرکەکانی بزوێنەر وەسف بکەیت و بۆچی Impeller لەسەر مۆبایل و جێی Skiaـی گرتەوە.
- پێنج ئاستەکەی لە foundationـەوە تا Material و Cupertino ڕیز بکەیت.
- ،
Elementـەکان و لە یەک جیا بکەیتەوە و پەنجەلێدانێک تا وێنەیەکی نوێی شاشە بەدوادا بچیت.
Flutter is built in layersFlutter بە چینەکان دروست کراوە
You can use Flutter without knowing what is inside it. But when an error message mentions "the engine", when a package says it is a "plugin", or when someone says Flutter "paints its own pixels", it helps to know how Flutter is built. The lecture's answer: Flutter is a layered system.
دەتوانیت بەکار بهێنیت بەبێ ئەوەی بزانیت چی تێدایە. بەڵام کاتێک پەیامێکی هەڵە باسی «بزوێنەر» دەکات، کاتێک پاکێجێک دەڵێت «»، یان کاتێک کەسێک دەڵێت « خۆی دەکێشێت»، باشە بزانیت چۆن دروست کراوە. وەڵامی وانەکە: سیستەمێکی چەندچینە.
- Each layer depends on the layer below it and uses only what that layer offers.
- A single layer is made of several independent libraries.
- No layer has special access to the one below, and every part of the framework level is optional and can be replaced.
- هەر پشت بەو دەبەستێت کە لە ژێریدایە و تەنها ئەوە بەکار دەهێنێت کە ئەو پێشکەشی دەکات.
- یەک لە چەند سەربەخۆ پێک دێت.
- هیچ دەستڕاگەیشتنی تایبەتی بە خوارەوەی نییە و هەموو بەشێکی ئاستی هەڵبژاردەییە و دەتوانرێت بگۆڕدرێت.
At a high level there are three main layers: the framework (on top), the engine (in the middle) and the embedder (at the bottom, next to the operating system). Your own app sits on top of them all. Watch them stack up:
لە ئاستێکی بەرزەوە سێ سەرەکی هەن: (لە سەرەوە)، بزوێنەر (Engine، لە ناوەڕاست) و Embedder (لە خوارەوە، لە تەنیشت ). خۆت لە سەرووی هەموویانەوەیە. سەیر بکە چۆن لەسەر یەک دادەنرێن:


Flutter is built in layersFlutter بە چینەکان دروست کراوە
An everyday picture: a block of flatsوێنەیەکی ڕۆژانە: باڵەخانەیەکی شوقە
Think of a block of flats. The foundation is dug to fit the ground of this particular site; on another site it would be dug differently (the embedder fits Flutter to each operating system). The machine room holds the generator, the water pumps and the lifts: heavy machinery nobody sees (the engine). The floors, walls and stairs are the same design in every building of this type (the framework). And your flat is the part you decorate yourself (your app).
باڵەخانەیەکی شوقە وێنا بکە. بناغەکە بە پێی زەویی ئەو شوێنە تایبەتە هەڵکەنراوە؛ لە شوێنێکی تر بە شێوەیەکی تر هەڵدەکەنرا (Embedder لەگەڵ هەر دەگونجێنێت). ژووری ئامێرەکان موەلیدە، پەمپی ئاو و مەسعەدەکانی تێدایە: ئامێری قورس کە کەس نایبینێت (بزوێنەر). نهۆم، دیوار و پەیژەکان لە هەموو باڵەخانەیەکی ئەم جۆرەدا هەمان دیزاینیان هەیە (). شوقەکەی تۆ ئەو بەشەیە کە خۆت دەیڕازێنیتەوە ().
Where the analogy stops workingسنووری ئەم نموونەیە
Unlike a real building, Flutter's upper layers can be swapped: you could replace a framework library with your own. And the "floors" talk to the machine room only through fixed doors (the engine's Dart interface, dart:ui).
بە پێچەوانەی باڵەخانەی ڕاستەقینە، سەرەوەی دەگۆڕدرێن: دەتوانیت بە هی خۆت بگۆڕیت. هەروەها «نهۆمەکان» تەنها لە ڕێگەی دەرگای دیاریکراوەوە قسە لەگەڵ ژووری ئامێرەکان دەکەن ( بزوێنەرەکە، dart:ui).
The layers at a glanceچینەکان بە کورتی
| Layer | Written inبە چی نووسراوە | Main jobئەرکی سەرەکی | Who writes itکێ دەینووسێت |
|---|---|---|---|
| Your app | Dart | Builds screens from widgets and holds your app's logicشاشەکان لە دروست دەکات و لۆجیکی هەڵدەگرێت | Youتۆ |
| Framework | Dart | Widgets, layout, painting, gestures, animation, accessibility، ، کێشان، ، ، | The Flutter teamتیمی |
| Engineبزوێنەر (Engine) | Mostly C++زۆربەی C++ | Turns scenes into pixels (Impeller), text layout, file and network input/output, the Dart runtimeوێنە پێکەوەنراوەکان دەکات بە (Impeller)، ئامادەکردنی دەق بۆ پیشاندان، و و ، | The Flutter teamتیمی |
| Embedder | The platform's languageزمانی | Entry point; connects to the OS for the drawing surface, input, accessibility and the event loopخاڵی دەستپێکردن؛ بە دەبەستێتەوە بۆ ڕووی کێشان، ، و | The Flutter teamتیمی |
The embedder: Flutter's door into each systemEmbedder: دەرگای Flutter بۆ ناو هەر سیستەمێک
The bottom layer has platform-specific embedders, one for each kind of operating system. An embedder is the native app that hosts Flutter. It provides the entry point (what starts when you open the app) and coordinates with the operating system to use its services: the surface to draw on, input (touches, keys, mouse), accessibility, storage, and the event loop. It also sets up the engine and creates the threads that run the UI and the drawing.
خوارەوە Embedderـی تایبەت بە هەر هەیە، یەکێک بۆ هەر جۆرە . Embedder ئەو ڕەسەنەیە کە لە خۆی دەگرێت. خاڵی دەستپێکردن دابین دەکات (ئەوەی کاتێک دەکەیتەوە دەست پێ دەکات) و لەگەڵ هەماهەنگ دەبێت بۆ بەکارهێنانی خزمەتگوزارییەکانی: ڕووی کێشان، (دەستلێدان، ، )، ، خەزنکردن و . هەروەها بزوێنەرەکە ئامادە دەکات و ئەو ڕێڕەوانەی کار (threads) دروست دەکات کە و کێشان جێبەجێ دەکەن.
| Platform | Embedder written inEmbedder بە چی نووسراوە | How Flutter appears there لەوێ چۆن دەردەکەوێت |
|---|---|---|
| Android | Java, C++ | An Activity that shows a FlutterViewActivityـێک کە FlutterViewـێک پیشان دەدات |
| iOS and macOSiOS و macOS | Swift, Objective-C / Objective-C++ | A view controller (FlutterViewController) that draws with Metalview controllerـێک (FlutterViewController) کە بە Metal دەکێشێت |
| Windows | C++ | A Win32 app; drawing goes through ANGLE to DirectX 11 Win32؛ کێشان لە ڕێگەی ANGLEـەوە دەچێت بۆ DirectX 11 |
| Linux | C++ | A native Linux app ڕەسەنی Linux |
Because the engine does not depend on any one platform, anyone can write a custom embedder: people run Flutter on a Raspberry Pi or inside a car's screen this way.
چونکە بزوێنەرەکە پشت بە هیچ دیاریکراو نابەستێت، هەر کەسێک دەتوانێت Embedderـێکی تایبەت بنووسێت: خەڵک بەم شێوەیە لەسەر Raspberry Pi یان لە ناو شاشەی ئۆتۆمبێلدا کار پێ دەکەن.
The engine: the core of Flutterبزوێنەر: ناوکی Flutter
The middle layer is the engine, the core of Flutter, written mostly in C and C++. The lecture lists its main jobs:
ناوەڕاست بزوێنەرە (Engine)، ناوکی کە زۆربەی بە C و C++ نووسراوە. وانەکە ئەرکە سەرەکییەکانی ڕیز دەکات:
- Input and output: it receives input events from the embedder and handles low-level output.
- Rasterizing composited scenes: it takes the finished picture that the framework describes and turns it into pixels, using its renderer (today Impeller).
- Services and network protocols: network input and output, file management, and Flutter's core API.
- Also: text layout, support for accessibility and plugins, and the Dart runtime with its compile toolchain.
- و : لە Embedderـەوە وەردەگرێت و ئاستی نزم بەڕێوە دەبات.
- گۆڕینی وێنە پێکەوەنراوەکان (composited scenes) بۆ : ئەو وێنە تەواوەی وەسفی دەکات وەردەگرێت و بە وێناکەرەکەی (ئەمڕۆ Impeller) دەیکات بە .
- خزمەتگوزاری و پرۆتۆکۆلەکانی : و ، بەڕێوەبردنی و ناوکی .
- هەروەها: ئامادەکردنی دەق بۆ پیشاندان، پشتگیریی و و لەگەڵ ئامرازەکانی کۆمپایلکردنی.
Your Dart code never calls the C++ engine directly. The engine shows a small Dart face to the framework, a library called dart:ui, with low-level classes for input, graphics and text. The framework is built on top of dart:ui.
کۆدی هەرگیز ڕاستەوخۆ بزوێنەرە C++ـەکە بانگ ناکات. بزوێنەرەکە ڕووێکی بچووکی پیشانی دەدات، بە ناوی dart:ui، بە ئاستی نزم بۆ ، گرافیک و دەق. لەسەر dart:ui بنیات نراوە.
The engine: the core of Flutterبزوێنەر: ناوکی Flutter
Impeller: Flutter's rendererImpeller: وێناکەری Flutter
A renderer turns a description of a scene ("a blue rounded box here, this text there") into coloured pixels on the screen, using the phone's graphics processor (GPU). The GPU runs small programs called shaders to draw each shape.
وێناکەر وەسفی وێنەیەک («سندووقێکی شینی گۆشە خڕ لێرە، ئەم دەقە لەوێ») دەکات بە ڕەنگاوڕەنگ لەسەر شاشەکە، بە بەکارهێنانی . بەرنامە بچووکەکانی پێی دەوترێت shader جێبەجێ دەکات بۆ کێشانی هەر شێوەیەک.
For years Flutter used the Skia graphics library. Skia sometimes had to prepare (compile) a shader the first time an animation needed it, while the app was running. That caused small stutters, called jank, the first time an animation played. Impeller, Flutter's own renderer, fixes this: it prepares a smaller, simpler set of shaders in advance, when the engine itself is built, so nothing has to be compiled while the user watches. The result is predictable, smooth performance.
بۆ چەند ساڵێک گرافیکی Skiaـی بەکار دەهێنا. Skia هەندێک جار دەبوو یەکەم جار کە پێویستی بە shaderـێک بوو، لە کاتی کارکردنی ئامادەی بکات (کۆمپایلی بکات). ئەمە لەرزینی بچووکی دروست دەکرد کە پێی دەوترێت jank، یەکەم جار کە پیشان دەدرا. Impeller، وێناکەری خودی ، ئەمە چارەسەر دەکات: کۆمەڵێکی بچووکتر و سادەتر لە shader پێشوەختە ئامادە دەکات، لە کاتی بیلدکردنی خودی بزوێنەرەکەدا، بۆیە هیچ شتێک لە کاتێکدا سەیر دەکات کۆمپایل ناکرێت. ئەنجامەکە خێراییەکی پێشبینیکراو و لووسە.
Which renderer runs whereکام وێناکەر لە کوێ کار دەکات
| Platform | Renderer in October 2026وێناکەر لە تشرینی یەکەمی ٢٠٢٦ |
|---|---|
| iOS | Impeller only (Skia can no longer be chosen)تەنها Impeller (Skia ئیتر هەڵنابژێردرێت) |
| Android | Impeller by default on Android 10 (API 29) and newer with Vulkan; older devices, or devices without Vulkan, fall back to the legacy OpenGL rendererImpeller وەک بنەڕەت لەسەر Android 10 (API 29) و نوێتر بە Vulkan؛ ئامێرە کۆنترەکان، یان ئەوانەی Vulkanـیان نییە، دەگەڕێنەوە بۆ وێناکەرە کۆنەکەی OpenGL |
| Windows, macOS, LinuxWindows، macOS، Linux | Impeller by default since Flutter 3.47Impeller وەک بنەڕەت لە 3.47ـەوە |
| Webوێب | Skia (compiled to WebAssembly); Impeller may come laterSkia (کۆمپایلکراو بۆ WebAssembly)؛ لەوانەیە دواتر Impeller بێت |
The framework: where you workفرەیموۆرک: ئەو شوێنەی تۆ تێیدا کار دەکەیت
The top layer is the framework. It is the part the developer works with to write Flutter apps. It is written in Dart and comes with ready-made libraries, layouts, widgets and more. The lecture names three main parts (foundation, rendering, widgets). The current documentation describes five levels, from the bottom up:
سەرەوە . ئەو بەشەیە کە کاری لەگەڵ دەکات بۆ نووسینی . بە نووسراوە و ، ، و شتی تری ئامادەی لەگەڵدایە. وانەکە سێ بەشی سەرەکی ناو دەبات (foundation، rendering، widgets). بەڵگەنامەی ئێستا پێنج ئاست وەسف دەکات، لە خوارەوە بۆ سەرەوە:
- FoundationFoundation (بنچینە)
Basic building blocks that every other part uses.
بلۆکە بنەڕەتییەکان کە هەموو بەشەکانی تر بەکاریان دەهێنن.
- Animation, painting, gesturesAnimation، painting، gestures
Moving things smoothly, drawing shapes and images, and recognising taps, drags and pinches.
جووڵاندنی شتەکان بە لووسی، کێشانی شێوە و وێنە و ناسینەوەی پەنجەلێدان، ڕاکێشان و تر.
- RenderingRendering، واتە وێناکردن
The tree of render objects: it works out sizes and positions (layout) and paints them.
داری : قەبارە و شوێنەکان دەدۆزێتەوە () و دەیانکێشێت.
- WidgetsWidgets، واتە ویجێتەکان
The building blocks you use. Every render object has a widget that describes it. This is where the declarative, reactive style begins.
ئەو بلۆکانەی تۆ بەکاریان دەهێنیت. هەموو هەیە کە وەسفی دەکات. ئێرە ئەو شوێنەیە کە شێوازی وەسفی و کاردانەوەیی دەست پێ دەکات.
- Material and CupertinoMaterial و Cupertino
Two ready design families built from widgets: Google's Material Design and the iOS-style Cupertino set.
دوو خێزانی دیزاینی ئامادە کە لە دروست کراون: Material Designـی Google و کۆمەڵەی Cupertino بە شێوەی iOS.
The framework itself is small on purpose. Extra features such as the camera, web views, HTTP requests or in-app payments come as packages from pub.dev, so an app only carries what it uses.
خودی بە ئەنقەست بچووکە. تایبەتمەندییە زیادەکانی وەک کامێرا، web view، HTTP یان پارەدان لە ناو وەک پاکێج لە pub.devـەوە دێن، بۆیە تەنها ئەوە هەڵدەگرێت کە بەکاری دەهێنێت.
The framework: where you workفرەیموۆرک: ئەو شوێنەی تۆ تێیدا کار دەکەیت
Open source: you can read the codeکۆدکراوە: دەتوانیت کۆدەکە بخوێنیتەوە
As the lecture notes, Flutter is open source, so we can check its code and even change it for our needs. The framework is plain Dart code, licensed under BSD 3-Clause. In your editor you can jump from a widget you use, such as Center, straight to its source and read how the Flutter team wrote it.
وەک وانەکە دەڵێت، ، بۆیە دەتوانین کۆدەکەی بپشکنین و تەنانەت بە پێی پێویستیمان بیگۆڕین. کۆدی سادەی ، بە BSD 3-Clause. لە دەستکاریکەرەکەتدا دەتوانیت لەو بەکاری دەهێنیت، وەک Center، ڕاستەوخۆ بڕۆیت بۆ و بخوێنیتەوە کە تیمی چۆن نووسیویەتی.
Widgets, elements and render objectsویجێتەکان، Elementـەکان و ئۆبجێکتەکانی وێناکردن
Inside the framework, one short piece of your code becomes three parallel trees. This is only an introduction; later lessons use these words. Here is a tiny widget:
لە ناو ، پارچەیەکی کورتی کۆدەکەت دەبێتە سێ داری هاوتەریب. ئەمە تەنها ناساندنێکە؛ وانەکانی داهاتوو ئەم وشانە بەکار دەهێنن. ئەمە بچووکە:
import 'package:flutter/material.dart';
class Greeting extends StatelessWidget {
const Greeting({super.key});
@override
Widget build(BuildContext context) {
return const Center(
child: Text('Hello, Erbil!'),
);
}
}Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 3
Greetingis a widget: an immutable description of part of the UI.Greeting: وەسفێکی بۆ بەشێک لە .- Lineدێڕی 7-11
buildreturns more widgets.CenterandTextare widgets too; Flutter keeps building until it reaches widgets that can make render objects.buildزیاتر دەگەڕێنێتەوە.CenterوTextـیش ؛ بەردەوام دروست دەکات تا دەگاتە ئەو دەتوانن دروست بکەن.
Elementـەکان لە بیریان دەمێنێت، و کێشان دەکەن.CêITThe three trees behind every screen: widgets describe, elements keep the place in the tree and render objects lay out and paint.
سێ پشت هەر شاشەیەک: وەسف دەکەن، شوێنی لە دەپارێزن و قەبارە و شوێن دیاری دەکەن و دەیکێشن.
Whole video (7:40): widget, element and render trees; episode 2 of "How Flutter Works".
هەموو ڤیدیۆکە (7:40): ، و ؛ ئەڵقەی دووەمی How Flutter Works.
Widgets, elements and render objectsویجێتەکان، Elementـەکان و ئۆبجێکتەکانی وێناکردن
Three trees, three jobsسێ دار، سێ ئەرک
| Treeدار | What each node isهەر گرێیەک چییە | Lifetimeتەمەن |
|---|---|---|
| Widget tree | An immutable, lightweight blueprint: "a centred text saying Hello, Erbil!"پلانێکی و سووک: «دەقێکی ناوەڕاست کە دەڵێت Hello, Erbil!» | Short: new widgets are made on every rebuildکورت: لە هەر دووبارە دروستکردنەوەیەکدا نوێ دروست دەکرێن |
| Element tree | The widget's place in the tree. It holds state and decides, on a rebuild, whether to update the old object or replace it. BuildContext is a handle to an element.شوێنی لە دارەکەدا. هەڵدەگرێت و لە کاتی دووبارە دروستکردنەوەدا بڕیار دەدات کۆنەکە نوێ بکاتەوە یان بیگۆڕێت. BuildContext دەسکێکە بۆ Elementـێک. | Long: kept from frame to frameدرێژ: لە وێنەیەکی شاشەوە بۆ وێنەیەکی تر دەمێنێتەوە |
| Render treeداری | A render object works out its size and position (layout), paints itself and answers "was I tapped?" (hit testing). قەبارە و شوێنی خۆی دەدۆزێتەوە ()، خۆی دەکێشێت و وەڵامی «ئایا پەنجەم لێ درا؟» دەداتەوە. | Long: updated only where something changedدرێژ: تەنها لەو شوێنەی شتێک گۆڕاوە نوێ دەکرێتەوە |
This is how stays fast. When the state changes, your build methods create new, cheap widgets. The framework compares them with the old ones through the long-lived elements, and changes only the render objects that really differ. Note also that the real tree is often deeper than your code: Text builds a RichText widget, and Container with a colour adds a ColoredBox.
ئەمە ئەو ڕێگایەیە کە پێی خێرا دەمێنێتەوە. کاتێک دەگۆڕێت، buildـی تۆ نوێ و هەرزان دروست دەکەن. لە ڕێگەی Elementـە تەمەن درێژەکانەوە بەراوردیان دەکات لەگەڵ کۆنەکاندا و تەنها ئەو دەگۆڕێت کە بە ڕاستی جیاوازن. هەروەها بزانە داری ڕاستەقینە زۆرجار لە کۆدەکەت قووڵترە: Text RichText دروست دەکات و Container بە ڕەنگەوە ColoredBoxـێک زیاد دەکات.
From a tap to a new frameلە پەنجەلێدانێکەوە بۆ وێنەیەکی نوێی شاشە
Now follow one tap through all the layers. A phone usually redraws its screen 60 to 120 times a second; each new picture is called a frame. Here is what happens when the user taps a + button that adds one to a counter:
ئێستا یەک پەنجەلێدان بە ناو هەموو بەدوادا بچۆ. مۆبایل زۆرجار چرکەی ٦٠ تا ١٢٠ جار شاشەکەی دووبارە دەکێشێتەوە؛ بە هەر وێنەیەکی نوێ دەوترێت frame. ئەمە ئەوەیە کە ڕوو دەدات کاتێک پەنجە لە + دەدات کە یەک بۆ زیاد دەکات:


- Inputنێوخستە
The operating system detects the touch and gives it to the embedder, which passes it to the engine.
دەستلێدانەکە دەناسێتەوە و دەیدات بە Embedder کە دەینێرێت بۆ بزوێنەرەکە.
- Gesture and event handlerجووڵەی پەنجە و دەستگیرەی ڕووداو
Through
dart:ui, the framework gets the event. Its gesture system finds which widget was tapped and runs youronPressedcode, which changes the state.لە ڕێگەی
dart:uiـەوە، وەردەگرێت. سیستەمی دەدۆزێتەوە کام پەنجەی لێ دراوە و کۆدیonPressedـی تۆ جێبەجێ دەکات کە دەگۆڕێت. - Buildدروستکردن (build)
The changed part of the widget tree is built again; the elements update the matching render objects.
ئەو بەشەی کە گۆڕاوە دووبارە دروست دەکرێتەوە؛
Elementـەکان هاوتاکان نوێ دەکەنەوە. - Layout and paintڕێکخستنی ڕووکار و کێشان
Render objects work out sizes and positions (constraints go down, sizes go up) and record how to paint themselves. The framework puts the result together into a scene.
قەبارە و شوێنەکان دەدۆزنەوە (سنوورەکان دادەبەزن، قەبارەکان سەردەکەون) و تۆمار دەکەن چۆن خۆیان بکێشن. ئەنجامەکە پێکەوە دەنێت و وێنەیەکی پێکەوەنراو (scene) دروست دەکات.
- Rasterize and showگۆڕین بۆ پیکسڵ و پیشاندان
The engine turns the scene into pixels with Impeller on the GPU, and the embedder puts the new frame on the screen.
بزوێنەرەکە بە Impeller لەسەر وێنە پێکەوەنراوەکە دەکات بە و Embedder وێنە نوێیەکەی شاشە دەخاتە سەر شاشە.
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What is trueڕاستییەکە |
|---|---|
| "Flutter uses each phone's own buttons."« خودی هەر مۆبایلێک بەکار دەهێنێت.» | The framework provides its own widgets and the engine paints them. خۆی دابین دەکات و بزوێنەرەکە دەیانکێشێت. |
| "The engine is written in Dart."«بزوێنەرەکە بە نووسراوە.» | The engine is mostly C++; the framework is Dart.بزوێنەرەکە زۆربەی C++ـە؛ . |
| "Flutter renders with Skia on phones."« لەسەر مۆبایل بە Skia وێنا دەکات.» | Impeller is the renderer on iOS and the default on modern Android; Skia remains on the web.Impeller وێناکەرە لەسەر iOS و بنەڕەتە لەسەر Androidـی نوێ؛ Skia لەسەر وێب ماوەتەوە. |
| "One embedder works on every platform."«یەک Embedder لەسەر هەموو کار دەکات.» | Each platform has its own embedder in its own language.هەر Embedderـی خۆی هەیە بە زمانی خۆی. |
| "Widgets draw themselves."« خۆیان دەکێشن.» | Widgets only describe; render objects lay out and paint. تەنها وەسف دەکەن؛ و کێشان دەکەن. |
| "Rebuilding widgets every frame must be slow."«دووبارە دروستکردنەوەی لە هەر وێنەیەکی شاشەدا دەبێت خاو بێت.» | Widgets are cheap blueprints; long-lived elements and render objects are only updated where needed. پلانی هەرزانن؛ Elementـەکان و تەمەنیان درێژە و تەنها لەو شوێنانەی پێویستە نوێ دەکرێنەوە. |
Exercisesڕاهێنانەکان
Name the layer (framework, engine or embedder) for each job: (a) the ElevatedButton widget; (b) turning a finished scene into pixels; (c) receiving the touch from Android; (d) laying out a Row of three icons; (e) running the Dart code of your app; (f) giving Flutter a window on Windows.
بۆ هەر ئەرکێک ناو ببە (، بزوێنەر یان Embedder): (أ) ElevatedButton؛ (ب) گۆڕینی وێنەیەکی پێکەوەنراوی تەواو بۆ ؛ (ج) وەرگرتنی دەستلێدان لە Androidـەوە؛ (د) Rowـێک لە سێ ؛ (هـ) جێبەجێکردنی کۆدی ؛ (و) دانی پەنجەرەیەک بە لەسەر Windows.
Show answerوەڵامەکە پیشان بدە
- (a) Framework (the Material library).
- (b) Engine (its renderer, Impeller).
- (c) Embedder.
- (d) Framework (the rendering level).
- (e) Engine (the Dart runtime lives in the engine).
- (f) Embedder (on Windows, a Win32 app).
- (أ) ، لە Material.
- (ب) بزوێنەر (وێناکەرەکەی، Impeller).
- (ج) Embedderـەکە.
- (د) (ئاستی rendering).
- (هـ) بزوێنەر ( لە بزوێنەرەکەدایە).
- (و) Embedder (لەسەر Windows، Win32).
Which languages are the embedders written in for Android, iOS, macOS, Windows and Linux?
Embedderـەکانی Android، iOS، macOS، Windows و Linux بە چ زمانێک نووسراون؟
Show answerوەڵامەکە پیشان بدە
| Platform | Embedder languageزمانی Embedder |
|---|---|
| Android | Java, C++ |
| iOS and macOSiOS و macOS | Swift, Objective-C / Objective-C++ |
| Windows and LinuxWindows و Linux | C++ |
Say which renderer Flutter 3.47 uses in each case: (a) an iPhone; (b) a new Android phone with Vulkan; (c) an old Android 9 phone; (d) the web version of the app in Chrome.
بڵێ 3.47 لە هەر حاڵەتێکدا کام وێناکەر بەکار دەهێنێت: (أ) iPhone؛ (ب) مۆبایلێکی نوێی Android بە Vulkan؛ (ج) مۆبایلێکی کۆنی Android 9؛ (د) وەشانی وێبی لە Chromeـدا.
Show answerوەڵامەکە پیشان بدە
- (a) Impeller (the only option on iOS).
- (b) Impeller (default on API 29+ with Vulkan).
- (c) The legacy OpenGL renderer (Android 9 is API 28, below 29).
- (d) Skia, compiled to WebAssembly.
- (أ) Impeller (تاکە هەڵبژاردە لەسەر iOS).
- (ب) Impeller (بنەڕەت لەسەر API 29+ بە Vulkan).
- (ج) وێناکەرە کۆنەکەی OpenGL (Android 9 بریتییە لە API 28، کەمترە لە 29).
- (د) Skia، کۆمپایلکراو بۆ WebAssembly.
In the Greeting example, which widgets create their own render object, and which do not? Why does Flutter still need an element for every widget?
لە نموونەی Greetingـدا، کام خۆیان دروست دەکەن و کامیان نا؟ بۆچی هێشتا بۆ هەر پێویستی بە Elementـێک هەیە؟
Show answerوەڵامەکە پیشان بدە
Center (an Align) creates a RenderPositionedBox, and the RichText widget built by Text creates a RenderParagraph. Greeting and Text only build other widgets, so they have no render object of their own. Every widget still gets an element because the element is its place in the tree: it remembers the structure (and, for stateful widgets, the State) between rebuilds and decides what to update.
Center (کە Alignـە) RenderPositionedBoxـێک دروست دەکات و ئەو RichText کە Text دروستی دەکات RenderParagraphـێک دروست دەکات. Greeting و Text تەنها تر دروست دەکەن، بۆیە خۆیان نییە. هەموو هێشتا Elementـێک وەردەگرێت چونکە Element شوێنی ئەوە لە دارەکەدا: پێکهاتەکە لە نێوان دووبارە دروستکردنەوەکاندا لە بیر دەمێنێت (و بۆ ، Stateـەکە) و بڕیار دەدات چی نوێ بکرێتەوە.
Summaryپوختە
- Flutter is a layered system: each layer depends on the one below, and each layer is made of independent libraries.
- Embedder (platform languages: Java/C++ on Android, Swift and Objective-C/Objective-C++ on iOS and macOS, C++ on Windows and Linux): the entry point; it connects Flutter to the operating system.
- Engine (mostly C++): input and output, rasterizing scenes into pixels, text layout, network and file services, the Dart runtime. Its renderer is Impeller (Skia only on the web today).
- Framework (Dart): foundation; animation, painting, gestures; rendering; widgets; Material and Cupertino. It is what you use, and its code is open source.
- Three trees: widgets describe, elements keep their place, render objects lay out and paint. A tap goes up through the layers; a new frame comes back down.
- سیستەمێکی چەندچینە: هەر پشت بەوەی خوارەوەی دەبەستێت و هەر لە سەربەخۆ پێک دێت.
- Embedder (زمانی : /C++ لەسەر Android، Swift و Objective-C/Objective-C++ لەسەر iOS و macOS، C++ لەسەر Windows و Linux): خاڵی دەستپێکردن؛ بە دەبەستێتەوە.
- بزوێنەر (زۆربەی C++): و ، گۆڕینی وێنە پێکەوەنراوەکان بۆ ، ئامادەکردنی دەق بۆ پیشاندان، خزمەتگوزارییەکانی و ، . وێناکەرەکەی Impellerـە (ئەمڕۆ Skia تەنها لەسەر وێب).
- (): foundation؛ animation، painting، gestures؛ rendering؛ widgets؛ Material و Cupertino. ئەوەیە کە تۆ بەکاری دەهێنیت و کۆدەکەی .
- سێ دار: وەسف دەکەن،
Elementـەکان شوێنیان دەپارێزن، و کێشان دەکەن. پەنجەلێدان بە ناو سەردەکەوێت؛ وێنەیەکی نوێی شاشە دادەبەزێتەوە.
Name Flutter's three main layers from top to bottom and the language of each.سێ چینە سەرەکییەکەی Flutter لە سەرەوە بۆ خوارەوە و زمانی هەر یەکەیان ناو ببە.
Framework (Dart), engine (mostly C/C++), embedder (each platform's language).
()، بزوێنەر (زۆربەی C/C++)، Embedder (زمانی هەر ).
Why did Flutter replace Skia with Impeller on mobile?بۆچی Flutter لەسەر مۆبایل Skiaـی بە Impeller گۆڕی؟
To avoid jank from compiling shaders while the app runs: Impeller precompiles a smaller set of shaders when the engine is built, giving predictable performance.
بۆ دوورکەوتنەوە لە jank کە لە کۆمپایلکردنی shader لە کاتی کارکردنی دروست دەبوو: Impeller کۆمەڵێکی بچووکتر لە shader لە کاتی بیلدکردنی بزوێنەرەکەدا پێشوەختە کۆمپایل دەکات و خێراییەکی پێشبینیکراو دەدات.
What are the five levels of the framework?پێنج ئاستەکەی فرەیموۆرک چین؟
Foundation; animation, painting and gestures; rendering; widgets; Material and Cupertino.
Foundation؛ animation، painting و gestures؛ rendering؛ widgets؛ Material و Cupertino.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
How Flutter is built: a declarative framework in Dart, the build method, the parts of a project, and the layers of framework, engine and embedder.
چۆن دروست کراوە: وەسفی بە ، build، بەشەکانی پرۆژەیەک و ، engine و embedder.
Whole video (6:19), episode 1 of the official "How Flutter Works" series (April 2025).
هەموو ڤیدیۆکە (6:19)، ئەڵقەی یەکەمی زنجیرە فەرمییەکەی How Flutter Works (نیسانی 2025).
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Setting Up Flutter and Your First Projectئامادەکردنی Flutter و یەکەم پڕۆژەکەت
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.