Jump to content

Flutter (software): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Qualverse (talk | contribs)
Clarify web compilation patterns
Qualverse (talk | contribs)
Flutter 3.3 updates
Line 33: Line 33:


On May 12, 2022, Google announced the release of Flutter 3 and Dart 2.17. This update expanded the total number of platforms supported to six, including stable support for Linux and macOS on both Intel and Apple Silicon processors. <ref>{{Cite web|title=Flutter 3 Release Notes |url=https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-3.0.0|access-date=2022-08-09|website=docs.flutter.dev|language=en}}</ref>
On May 12, 2022, Google announced the release of Flutter 3 and Dart 2.17. This update expanded the total number of platforms supported to six, including stable support for Linux and macOS on both Intel and Apple Silicon processors. <ref>{{Cite web|title=Flutter 3 Release Notes |url=https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-3.0.0|access-date=2022-08-09|website=docs.flutter.dev|language=en}}</ref>

On August 30, 2022, Flutter 3.3 was announced. This released featured [[Objective-C]] and [[Swift (programming language)|Swift]] interop and an early preview of a new rendering engine called "Impeller" which aims to reduce stutter caused by [[shader]] compilation.<ref name=":2">{{Cite web |last=Sneath |first=Tim |date=2022-08-30 |title=Announcing Flutter 3.3 at Flutter Vikings |url=https://medium.com/flutter/announcing-flutter-3-3-at-flutter-vikings-6f213e068793 |access-date=2022-10-06 |website=Flutter |language=en}}</ref>


== Framework architecture ==
== Framework architecture ==
Line 50: Line 52:


=== Flutter engine ===
=== Flutter engine ===
Flutter's engine, written primarily in [[C++]], provides low-level [[Rendering (computer graphics)|rendering]] support using Google's [[Skia Graphics Engine|Skia]] graphics library. Additionally, it interfaces with [[Platform-specific model|platform-specific]] [[Software development kit|SDKs]] such as those provided by [[Android (operating system)|Android]] and [[iOS]].<ref name=":0">{{Cite web|url=https://flutter.dev/technical-overview/|title=Technical Overview - Flutter|website=flutter.dev|language=en|access-date=2017-12-13}}</ref> The Flutter Engine is a portable [[Runtime system|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.
Flutter's engine, written primarily in [[C++]], provides low-level [[Rendering (computer graphics)|rendering]] support using either Google's [[Skia Graphics Engine|Skia]] graphics library or the custom "Impeller" graphics layer.<ref name=":2" /> Additionally, it interfaces with [[Platform-specific model|platform-specific]] [[Software development kit|SDKs]] such as those provided by [[Android (operating system)|Android]] and [[iOS]] to implement accessibility, file and network I/O, native plugin support, and more.<ref name=":0">{{Cite web|url=https://flutter.dev/technical-overview/|title=Technical Overview - Flutter|website=flutter.dev|language=en|access-date=2017-12-13}}</ref>


=== Foundation library ===
=== Foundation library ===

Revision as of 22:09, 6 October 2022

Flutter
Original author(s)Google
Developer(s)Google and community
Initial releaseAlpha (v0.0.6) / May 12, 2017; 7 years ago (2017-05-12)[1]
Stable release
3.24.3[2] Edit this on Wikidata / 12 September 2024; 4 days ago (12 September 2024)
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

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 Canvas Kit 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]

On May 12, 2022, Google announced the release of Flutter 3 and Dart 2.17. This update expanded the total number of platforms supported to six, including stable support for Linux and macOS on both Intel and Apple Silicon processors. [15]

On August 30, 2022, Flutter 3.3 was announced. This released featured Objective-C and Swift interop and an early preview of a new rendering engine called "Impeller" which aims to reduce stutter caused by shader compilation.[16]

Framework architecture

The major components of Flutter include:

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

Dart platform

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

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.[18]

For better performance, release versions of Flutter apps on all platforms use ahead-of-time (AOT) compilation[19], except for on the Web where code is transpiled to JavaScript.[20]

Flutter engine

Flutter's engine, written primarily in C++, provides low-level rendering support using either Google's Skia graphics library or the custom "Impeller" graphics layer.[16] Additionally, it interfaces with platform-specific SDKs such as those provided by Android and iOS to implement accessibility, file and network I/O, native plugin support, and more.[17]

Foundation library

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.[17][21]

Design-specific widgets

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.[17][22][23][24]

IDE support

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

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

Basics of widgets in Flutter

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.[26] 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.[27]

Libraries

Flutter as a modern mobile app framework has a set of libraries which can simplify and speed development up. Libraries in Flutter are named as packages. Mostly common packages making work with such APIs of platform as connectivity and permissions easier for developer. A list of all Flutter libraries is available at https://pub.dev (The official package repository for Dart and Flutter apps.) [28]

See also

References

  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://github.com/flutter/flutter/releases/tag/3.24.3. {{cite web}}: Missing or empty |title= (help)
  3. ^ "FAQ - Flutter". Retrieved 2018-08-08.
  4. ^ "Google's "Fuchsia" smartphone OS dumps Linux, has a wild new UI". Ars Technica. 8 May 2017.
  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)". YouTube.
  9. ^ a b Amadeo, Ron (1 May 2015). "Google's Dart language on Android aims for Java-free, 120 FPS apps". Ars Technical.
  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. ^ "Flutter 3 Release Notes". docs.flutter.dev. Retrieved 2022-08-09.
  16. ^ a b Sneath, Tim (2022-08-30). "Announcing Flutter 3.3 at Flutter Vikings". Flutter. Retrieved 2022-10-06.
  17. ^ a b c d "Technical Overview - Flutter". flutter.dev. Retrieved 2017-12-13.
  18. ^ Lelel, Wm (26 February 2018). "Why Flutter Uses Dart". HackerNoon. Retrieved 5 December 2018.
  19. ^ stephenwzl (2018-08-01). "Flutter's Compilation Patterns". ProAndroidDev. Retrieved 2018-12-06.
  20. ^ "Building a web application with Flutter". docs.flutter.dev. Retrieved 2022-10-06.
  21. ^ "foundation library - Dart API". docs.flutter.dev. Retrieved 2017-12-13.
  22. ^ "Material Design Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  23. ^ "Cupertino (iOS-style) Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  24. ^ "Human Interface Guidelines". developer.apple.com. Retrieved 2019-10-08.
  25. ^ "Introduction to widgets". flutter.dev. Retrieved 2020-10-08.
  26. ^ "Widget class - widgets library - Dart API". api.flutter.dev. Retrieved 2021-10-04.
  27. ^ Das, Pankaj (2020-08-14). "What is the Relation Between Stateful and Stateless Widgets In Flutter? >> Flutter". flutteragency.com. Retrieved 2022-06-20.
  28. ^ "Flutter. Libraries you need for your project". cloudflex.team. Retrieved 2022-09-06.