Flutter (software)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Flutter
Google-flutter-logo.svg
Original author(s)Google
Developer(s)Google and community
Initial releaseAlpha (v0.0.6) / May 2017; 4 years ago (2017-05)[1]
Stable release
2.10.3[2] Edit this on Wikidata / 2 March 2022; 21 days ago (2 March 2022)
Repository
Written inC, C++, Dart[3]
PlatformAndroid, iOS, Google Fuchsia, Web platform, Linux, macOS and Windows
TypeApplication framework
LicenseNew BSD License
Websiteflutter.dev

Flutter is an open-source UI software development kit created by Google. It is used to develop cross platform applications for Android, iOS, Linux, macOS, Windows, Google Fuchsia,[4] and the web from a single codebase.[5]

First described in 2015,[6][7] Flutter was released in May 2017.[1]

History[edit]

The first version of Flutter was known as "Sky" and ran on the Android operating system. It was unveiled at the 2015 Dart developer summit[8] with the stated intent of being able to render consistently at 120 frames per second.[9] During the keynote of Google Developer Days in Shanghai in September 2018, Google announced Flutter Release Preview 2, the last major release before Flutter 1.0. On December 4th of that year, Flutter 1.0 was released at the Flutter Live event, denoting the first stable version of the framework. On December 11, 2019, Flutter 1.12 was released at the Flutter Interactive event.[10]

On May 6, 2020, the Dart software development kit (SDK) version 2.8 and Flutter 1.17.0 were released, adding support for the Metal API which improves performance on iOS devices by approximately 50%, as well as new Material widgets and network tracking development tools.

On March 3, 2021, Google released Flutter 2 during an online Flutter Engage event. This major update brought official support for web-based applications with a new CanvasKit renderer and web specific widgets, early-access desktop application support for Windows, macOS, and Linux and improved Add-to-App APIs.[11] This release also utilized Dart 2.0 that featured sound null-safety, which caused many breaking changes and issues with many external packages; however, the Flutter team included instructions and tools to mitigate these issues.[12]

On September 8th, 2021, Dart 2.14 and Flutter 2.5 were released by Google. The update brought improvements to the Android full-screen mode and the latest version of Google's Material Design called Material You. Dart received two new updates, standardizing lint conditions and marking support for Apple Silicon as stable.[13][14]

Framework architecture[edit]

The major components of Flutter include:

  • Dart platform
  • Flutter engine
  • Foundation library
  • Design-specific widgets
  • Flutter Development Tools (DevTools)

Dart platform[edit]

Flutter apps are written in the Dart language and make use of many of the language's more advanced features.[15]

While writing and debugging an application, Flutter runs in the Dart virtual machine, which features a just-in-time execution engine. This allows for fast compilation times as well as "hot reload", with which modifications to source files can be injected into a running application. Flutter extends this further with support for stateful hot reload, where in most cases changes to source code are reflected immediately in the running app without requiring a restart or any loss of state.[16]

For better performance, release versions of Flutter apps on all platforms use ahead-of-time (AOT) compilation.[17]

Flutter engine[edit]

Flutter's engine, written primarily in C++, provides low-level rendering support using Google's Skia graphics library. Additionally, it interfaces with platform-specific SDKs such as those provided by Android and iOS.[15] The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers interact with Flutter via the Flutter Framework, which provides a reactive framework and a set of platform, layout, and foundation widgets.

Foundation library[edit]

The Foundation library, written in Dart, provides basic classes and functions that are used to construct applications using Flutter, such as APIs to communicate with the engine.[15][18]

Design-specific widgets[edit]

The Flutter framework contains two sets of widgets that conform to specific design languages: Material Design widgets implement Google's design language of the same name, and Cupertino widgets implement Apple's iOS Human interface guidelines.[15][19][20][21]

IDE Support[edit]

Flutter maintains official support for the following IDEs and editors via plugins:

Other IDEs can be used with community-supported plugins, or by using Flutter tools from the command line.[9]

Widgets[edit]

Flutter uses a variety of widgets to deliver a fully functioning application. These widgets are Flutter's framework architecture.[22] Flutter's Widget Catalog provides a full explanation and API on the framework.

Basics of Widgets in Flutter[edit]

Widgets are generally defined in three basic types: Stateful widgets, Stateless widgets, and Inherited widgets. Being the central class hierarchy in the Flutter framework the three basic types of widgets are used in the construction of every Flutter application.[23] Although all the instances of a widget are immutable, the Stateful widget allows the interaction between user and application. By giving access to the method setState, the state can be maintained in separate state objects. Alternatively, the Stateless widget acts as a constant, and before anything displayed can be changed, the widget has to be recreated. The Inherited widget works by allowing another widget to subscribe to the Inherited widget's state allowing the state to be passed down to its children.[24]

See also[edit]

References[edit]

  1. ^ a b Chris Bracken. "Release v0.0.6: Rev alpha branch version to 0.0.6, flutter 0.0.26 (#10010) · flutter/flutter". GitHub. Retrieved 2018-08-08.
  2. ^ https://docs.flutter.dev/development/tools/sdk/releases?tab=macos.
  3. ^ "FAQ - Flutter". Retrieved 2018-08-08.
  4. ^ "Google's "Fuchsia" smartphone OS dumps Linux, has a wild new UI". Ars Technica.
  5. ^ Amadeo, Ron (2018-02-27). "Google starts a push for cross-platform app development with Flutter SDK". Ars Technica. Retrieved 2021-06-11.{{cite web}}: CS1 maint: url-status (link)
  6. ^ "With Flutter, Google Aims Dart to Mobile App Cross-Development". InfoQ. Retrieved 2022-03-17.
  7. ^ "Google announces Flutter 1.0, the first stable release of its cross-platform mobile development toolkit". Android Police. 2018-12-05. Retrieved 2022-03-17.
  8. ^ "Sky: An Experiment Writing Dart for Mobile (Dart Developer Summit 2015)".
  9. ^ a b Amadeo, Ron (1 May 2015). "Google's Dart language on Android aims for Java-free, 120 FPS apps". Ars Technica.
  10. ^ "Flutter: the first UI platform designed for ambient computing". Flutter blog. Retrieved 2019-12-11.
  11. ^ "Version 2 of Google's Flutter toolkit adds support for desktop and web apps". TechCrunch. Retrieved 2021-03-06.
  12. ^ "Migrating to null safety". dart.dev. Retrieved 2022-02-04.
  13. ^ Sells, Chris (2021-09-08). "What's new in Flutter 2.5". Flutter. Retrieved 2022-02-04.
  14. ^ "Flutter 2.5.0 release notes". docs.flutter.dev. Retrieved 2022-02-04.
  15. ^ a b c d "Technical Overview - Flutter". flutter.dev. Retrieved 2017-12-13.
  16. ^ Lelel, Wm (26 February 2018). "Why Flutter Uses Dart". HackerNoon. Retrieved 5 December 2018.
  17. ^ stephenwzl (2018-08-01). "Flutter's Compilation Patterns". ProAndroidDev. Retrieved 2018-12-06.
  18. ^ "foundation library - Dart API". docs.flutter.dev. Retrieved 2017-12-13.
  19. ^ "Material Design Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  20. ^ "Cupertino (iOS-style) Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  21. ^ "Human Interface Guidelines". developer.apple.com. Retrieved 2019-10-08.
  22. ^ "Introduction to widgets". flutter.dev. Retrieved 2020-10-08.
  23. ^ "Widget class - widgets library - Dart API". api.flutter.dev. Retrieved 2021-10-04.
  24. ^ K, Pradeep (2020-08-14). "What is the difference between stateless and stateful widgets? >>Flutter". DevOpsSchool.com. Retrieved 2021-10-04.

External links[edit]