Targets · Dart · Entry point
Starting a program and mounting it as a Flutter app.
How a Program becomes Dart, in parts. Start with the introduction, then follow each part into the rendered output and the runtime it links against.
A program starts with a single call that takes the root component and the drivers it uses. On Dart the result is a Flutter widget, so it is handed straight to runApp — the running program is the app's root.
The root component is the run body: its calls emit the interface, its state lives across cycles, and its nesting becomes nested closures (see the example ). Flutter owns the lifecycle — when the widget is unmounted the program's drivers are torn down.
The model is exactly the JavaScript entry point ; only the mount differs — runApp and a widget instead of a DOM element and a cancel .