What Flutter is and how it is arranged
Flutter is an open-source Google framework for graphical interface apps in the Dart language. From one codebase it builds apps for Android, iOS, the web, Windows, macOS and Linux, and draws the screen itself with its own engine, without the system interface elements.
Flutter suits the case where one app has to ship on several platforms with the same look and behaviour: the Material and Cupertino widgets are written in Dart and do not depend on the OS version. A native component that makes no sense to rewrite — a map, a web view — is embedded as a platform view. Such an insert is continuously synchronised with the platform and costs performance, so an app made of native components alone is closer to native development.
Flutter is arranged in layers, and each layer relies only on the one beneath it. The app assembles the interface from the widgets of the framework, which is written in Dart: Material and Cupertino, basic widgets, layout and rendering, animation and gestures. Through the dart:ui library the framework talks to the engine written in C++: the engine rasterises frames through Impeller, lays out text and hosts the Dart runtime. The bottom layer is the embedder, written in the language of the platform: it starts the app, provides a surface for drawing, input and the event loop.
During development the code runs in the Dart VM: hot reload without losing state is built on this. In release, Dart code is ahead-of-time (AOT) compiled into ARM or x64 machine code, and for the web into JavaScript or WebAssembly. Code in Kotlin, Java, Swift and Objective-C is called through platform channels, C libraries through dart:ffi; ready-made wrappers over device APIs are published on pub.dev as plugins.
How Flutter differs from React Native and native development
| Feature | Flutter | React Native | Natively: Compose, SwiftUI |
|---|---|---|---|
| Language | Dart | JavaScript and React | Kotlin for Android, Swift for iOS |
| Who draws the interface | its own Impeller engine, the system widgets are not used | the system views of Android and iOS: React components turn into them | the UI framework of the platform itself |
| How the interface is described | declaratively: a widget tree | declaratively: React components | declaratively: Compose composable functions, View structures in SwiftUI |
| Platforms from one codebase | Android, iOS, the web, Windows, macOS, Linux | Android and iOS | one |
| Access to platform APIs | plugins, platform channels, FFI | from JavaScript and through its own native components | directly |
Choose Flutter when you need one codebase and the same interface on mobile, the web and desktop. Choose React Native when the team writes in React and the interface should consist of the system views. Choose native development when the app is made for a single platform and relies on its system components.
What to know in advance
- Programming basics: variables, functions, classes. Dart itself is covered in the “Dart syntax” and “Asynchrony in Dart: Future, Stream and isolates” sections.
- The command line and the
PATHvariable — the Bash reference. - HTTP requests and JSON for working with the network — the HTTP and REST reference.
- Signing and the app store requirements — the “Android and Kotlin” and “iOS and Swift” references, the sections on publishing.
Section sources
the section is written from these pages- Flutter architectural overviewdocs.flutter.dev/resources/architectural-overview(opens in a new tab)
- FAQdocs.flutter.dev/resources/faq(opens in a new tab)
- Core Components and Native Componentsreactnative.dev/docs/intro-react-native-components(opens in a new tab)
- Thinking in Composedeveloper.android.com/develop/ui/compose/mental-model(opens in a new tab)
- Declaring a custom viewdeveloper.apple.com/documentation/swiftui/declaring-a-custom-view(opens in a new tab)