Flutter (software)

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

Flutter
Original author(s)Google
Developer(s)Google and community
Initial releaseAlpha (v0.0.6) / May 2017 (2017-05)[1]
Stable release
1.20.2 / August 14, 2020 (2020-08-14)[2]
Preview release
1.20.0-7.4.pre / August 4, 2020 (2020-08-04)[3]
Written inC, C++, Dart[4]
PlatformAndroid, iOS, Google Fuchsia, Web platform, Linux, macOS and Windows
TypeApplication framework
LicenseNew BSD License
Websiteflutter.dev

The first version of Flutter was known as codename "Sky" and ran on the Android operating system. It was unveiled at the 2015 Dart developer summit[7], with the stated intent of being able to render consistently at 120 frames per second.[8] During the keynote of Google Developer Days in Shanghai, Google announced Flutter Release Preview 2 which is the last big release before Flutter 1.0. On December 4, 2018, 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.[9]

On May 6, 2020, the Dart SDK in version 2.8 and the Flutter in version 1.17.0 were released, where support was added to the Metal API, improving performance on iOS devices (approximately 50%), new Material widgets, and new network tracking tools.

Framework architecture

The major components of Flutter include:

  • Dart platform
  • Flutter engine
  • Foundation library
  • Design-specific widgets

Dart platform

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

On Windows, macOS and Linux[11] Flutter runs in the Dart virtual machine which features a just-in-time execution engine. While writing and debugging an app, Flutter uses Just In Time compilation, allowing for "hot reload", with which modifications to source files can be injected into a running application. Flutter extends this with support for stateful hot reload, where in most cases changes to source code can be reflected immediately in the running app without requiring a restart or any loss of state.[12]

Release versions of Flutter apps are compiled with ahead-of-time (AOT) compilation on both Android and iOS,[13] making Flutter's high performance on mobile devices possible.

Flutter engine

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.[10] 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 will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.

Foundation library

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

Design-specific widgets

The Flutter framework contains two sets of widgets which 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.[10][15][16][17]

Hello World example

A Hello, World program in Flutter looks like this:

 1 import 'package:flutter/material.dart';
 2 
 3 void main() => runApp(HelloWorldApp());
 4 
 5 class HelloWorldApp extends StatelessWidget {
 6   @override
 7   Widget build(BuildContext context) {
 8 
 9     //MaterialApp acts as a wrapper to the app and 
10     //provides many features like title,home,theme etc   
11     return MaterialApp(
12       title: 'Hello World App',
13 
14       //Scaffold acts as a binder that binds the appBar,
15       //bottom nav bar and other UI components at their places     
16       home: Scaffold(
17 
18           //AppBar() widget automatically creates a material app bar
19         appBar: AppBar(
20           title: Text('Hello World App'),
21         ),
22 
23         //Center widget aligns the child in center
24         body: Center(
25           child: Text('Hello World'),
26         ),
27       ),
28     );
29   }
30 }
gollark: Perhaps.
gollark: Motion-wise, nobody cares about computational efficiency.
gollark: That COULD be somewhat inefficient.
gollark: I assume the intention here was something like```pythondef mainloop(input): observe_object() if object_on_left(): return go_left() elif object_on_right() return go_right()```
gollark: Each "tick", though, do the new actions replace the old ones or what?

See also

References

  1. 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. "Flutter SDK releases". flutter.dev.
  3. "Flutter makes it easy and fast to build beautiful mobile apps.: flutter/flutter". July 2, 2020 via GitHub.
  4. "FAQ - Flutter". Retrieved 2018-08-08.
  5. "Google's "Fuchsia" smartphone OS dumps Linux, has a wild new UI". Ars Technica.
  6. "Flutter Single Codebase to Build Your Dream Application for iOS and Android". Concetto Labs.
  7. "Sky: An Experiment Writing Dart for Mobile (Dart Developer Summit 2015)".
  8. Amadeo, Ron (1 May 2015). "Google's Dart language on Android aims for Java-free, 120 FPS apps". Ars Technica.
  9. "Flutter: the first UI platform designed for ambient computing". Flutter blog. Retrieved 2019-12-11.
  10. "Technical Overview - Flutter". flutter.dev. Retrieved 2017-12-13.
  11. "Canonical enables Linux desktop app support with Flutter". Ubuntu. Retrieved 2020-07-09.
  12. Lelel, Wm (26 February 2018). "Why Flutter Uses Dart". HackerNoon. Retrieved 5 December 2018.
  13. stephenwzl (2018-08-01). "Flutter's Compilation Patterns". ProAndroidDev. Retrieved 2018-12-06.
  14. "foundation library - Dart API". docs.flutter.dev. Retrieved 2017-12-13.
  15. "Material Design Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  16. "Cupertino (iOS-style) Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
  17. "Human Interface Guidelines". developer.apple.com. Retrieved 2019-10-08.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.