Flutter (software)
![]() | |
Original author(s) | |
---|---|
Developer(s) | Google and community |
Initial release | Alpha (v0.0.6) / May 2017[1] |
Stable release | v1.17.1
/ May 14, 2020[2] |
Preview release | 1.18.0-10.0.pre
/ May 5, 2020[3] |
Repository | |
Written in | C, C++, Dart[4] |
Platform | Android, iOS, Google Fuchsia, Web platform, Windows, macOS and Linux |
Type | Application framework |
License | New BSD License |
Website | flutter |
Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Windows, Mac, Linux, Google Fuchsia[5] and the web.
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, with the stated intent of being able to render consistently at 120 frames per second.[6] 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.[7]
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.[8]
On Windows, macOS and Linux via the semi-official Flutter Desktop Embedding project, 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.[9] This feature as implemented in Flutter has received widespread praise[citation needed].
Release versions of Flutter apps are compiled with ahead-of-time (AOT) compilation on both Android and iOS,[10] 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.[8] 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.[8][11]
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.[8][12][13][14]
Hello World example
A Hello, World program in Flutter looks like this:
import 'package:flutter/material.dart';
void main() => runApp(HelloWorldApp());
class HelloWorldApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
//MaterialApp is acts as a wrapper to the app and
//provides many features like title,home,theme etc
return MaterialApp(
title: 'Hello World App',
//Scaffold acts as a binder that binds the appBar,
//bottom nav bar and other UI components at there places
home: Scaffold(
//AppBar() widget automatically creates a material app bar
appBar: AppBar(
title: Text('Hello World App'),
),
//Center widget aligns the child in center
body: Center(
child: Text('Hello World'),
),
),
);
}
}
See also
- List of rich Internet application frameworks
- Multiple phone web-based application framework
- NativeScript
- Xamarin
- Appcelerator Titanium
- Apache Cordova
- React Native
References
- ^ 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.
- ^ "Flutter SDK releases". flutter.dev.
- ^ "Flutter makes it easy and fast to build beautiful mobile apps.: flutter/flutter". July 29, 2019 – via GitHub.
- ^ "FAQ - Flutter". Retrieved 2018-08-08.
- ^ "Google's "Fuchsia" smartphone OS dumps Linux, has a wild new UI". Ars Technica.
- ^ Amadeo, Ron (1 May 2015). "Google's Dart language on Android aims for Java-free, 120 FPS apps". Ars Technica.
- ^ "Flutter: the first UI platform designed for ambient computing". Flutter blog. Retrieved 2019-12-11.
- ^ a b c d "Technical Overview - Flutter". flutter.dev. Retrieved 2017-12-13.
- ^ Lelel, Wm (26 February 2018). "Why Flutter Uses Dart". HackerNoon. Retrieved 5 December 2018.
- ^ stephenwzl (2018-08-01). "Flutter's Compilation Patterns". ProAndroidDev. Retrieved 2018-12-06.
- ^ "foundation library - Dart API". docs.flutter.dev. Retrieved 2017-12-13.
- ^ "Material Design Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
- ^ "Cupertino (iOS-style) Widgets - Flutter". flutter.dev. Retrieved 2017-12-13.
- ^ "Human Interface Guidelines". developer.apple.com. Retrieved 2019-10-08.
External links
- Official website
- Tim Sneath: "Flutter is to apps as Unity is to games" – Google's product manager for Flutter interview about the development of Flutter