| Flutter | |
|---|---|
| Original author | |
| Developers | Google and community |
| Initial release | Alpha (v0.0.6) / May 12, 2017; 8 years ago (2017-05-12)[1] |
| Stable release | |
| Repository | |
| Written in | C,C++,Dart[2] |
| Platform | Android,iOS,Google Fuchsia,Web platform,Linux,macOS andWindows |
| Type | Application framework |
| License | New BSD License |
| Website | flutter |
Flutter is anopen-sourceUIsoftware development kit created byGoogle. It can be used to developcross platform applications from asinglecodebase for theweb,[3]Fuchsia,Android,iOS,Linux,macOS, andWindows.[4] First described in 2015,[5][6] Flutter was released in May 2017. Flutter is used internally by Google in apps such asGoogle Pay[7][8] andGoogle Earth[9][10] as well as by other software developers includingByteDance[11][12] andAlibaba.[13][14]
Flutter ships applications with its own rendering engine which directly outputs pixel data to the screen.[15][16] This is in contrast to many other UIframeworks that rely on the target platform to provide a rendering engine, such as nativeAndroid apps which rely on the device-levelAndroid SDK orIOS SDK which use the target platform's built-in UI stack. Flutter's control of its rendering pipeline simplifies multi-platform support as identical UI code can be used for all target platforms.[16]
The basic component in a Flutter program is a "widget", which can in turn consist of other widgets.[17] A widget describes the logic, interaction, and design of a UI element with an implementation similar toReact.[17] Unlike other cross-platform toolkits such asReact Native andXamarin which draw widgets using native platform components, Flutter renders widgets itself on a per-pixel basis. Flutter has two types of widgets:stateless andstateful. Stateless widgets only update if their inputs change, meaning they otherwise won't need to be rebuilt when other elements of the screen change, while stateful widgets can call thesetState() method to update an internal state and redraw.[17][18] Although widgets are the primary method of constructing Flutter applications, they can also be bypassed in favor of directly drawing on a canvas. This feature has been occasionally used to implement game engines in Flutter.[19]
The Flutter framework contains two sets of widgets that conform to specific design languages:Material Design widgets implement Google'sdesign language of the same name, andCupertino widgets implement Apple'siOSHuman interface guidelines.[20][21] Flutter allows the developer to use either set of widgets on either platform. Developers can use Cupertino widgets on Android.
Flutter apps are written in theDart language. Release versions of Flutter apps on all platforms useahead-of-time (AOT) compilation[22] except for on the Web where code istranspiled toJavaScript or WebAssembly.[23][24] Flutter inherits Dart'sPubpackage manager andsoftware repository, which allows users to publish and use custom packages as well as Flutter-specific plugins.[25] The Foundation library, written inDart, provides basic classes and functions that are used to construct applications using Flutter, such asAPIs to communicate with the engine.[21][26]
Flutter's engine, written primarily inC++, provides low-levelrendering support using either Google'sSkia graphics library or the custom "Impeller" graphics layer, which is enabled by default on iOS and Android API 29 and higher.[27][28][29] The engine interfaces withplatform-specificSDKs such as those provided byAndroid andiOS to implement features like accessibility, file and network I/O, native plugin support, etc.[21]
The first version of Flutter was known as "Sky" and ran on theAndroidoperating system.[30] It was unveiled at the 2015Dart developer summit with the stated intent of being able torender consistently at 120frames per second.[30] On December 4, 2018, Flutter 1.0 was released at the Flutter conference in London.[31]
On May 6, 2020, the Dart software development kit (SDK) version 2.8 and Flutter 1.17.0 were released, adding support for theMetalAPI.[32]
On March 3, 2021, Google released Flutter 2 during an online Flutter Engage event.[7][33] It added aCanvas-based renderer for web in addition to the HTML-based renderer and early-access desktop application support forWindows,macOS, andLinux.[33][7] It also shipped with Dart 2.0 which included support fornull-safety.[7][34] Null safety was initially optional as it was a breaking change and was made mandatory in Dart 3 released in 2023.[34][35]
On May 12, 2022, Flutter 3 and Dart 2.17 were released with support for all desktop platforms as stable.[36]
On October 27, 2024, a number of Flutter community developers announcedFlock, a fork of Flutter intended to be easier to contribute to while still keeping in sync with all changes made in the upstream code base.[37][38]
On the mobile side, companies like WeChat, ByteDance, Betterment, SHEIN and BMW are now betting on Flutter — as does Google itself.
It does so by relying heavily on Skia, a graphics-rendering engine written in C/C++ that uses a device's CPU or GPU to draw app interfaces on its own, without relying on native platform interface libraries.
In general the design style follows Google's Material Design guidelines, making it particularly at home on Android (as you would expect from Google), but there is also support for Cupertino widgets for a native iOS look and feel.
Flutter now uses Metal by default when building for supported iOS devices, making Flutter apps run faster.
.