Flutter the knowledge we need to point

Flutter is a highly efficient cross-platform free and open source SDK, to support the Android mobile side, iOS development, also supports Web desktop, embedded interface development. Has now been updated to version 1.5, let's introduce the concept of Flutter, Flutter what to do, what language development Flutter, Flutter framework, Flutter construction principle, Flutter how to run Android and iOS, and so on.

First, what is the Flutter

Flutter is Google's mobile applications SDK, is used to create high-quality in the Android and iOS platforms native experience. Until now update to version 1.5, supports desktop and embedded Web interface development.

Two, Flutter can do

For users who applied, Flutter lets them experience the beautiful and flexible UI interface.

For us developers, Flutter lowering the threshold for creating mobile applications. It accelerates the development of mobile applications, reducing both Android and iOS application development cost and complexity.

For designers, Flutter ensure accurate design intent, without compromising fidelity or be forced to compromise. In the hands of designers, Flutter can also serve as an efficient prototyping tool.

Three, Flutter Features

Flutter and most of the tools used to build mobile applications is different because it uses neither WebView, do not use the device that comes with OEM Widget, but uses its own high-performance rendering engine to draw Widget.

Flutter in that the tool is different from the other, it is only one simple C / C ++ code above this, the use of Flutter Dart (a modernizing, simple object-oriented languages) most systems implement features (layout, gesture, animation framework, Widget, etc.), this language allows developers to easily read, change, delete, or replace.

Four, Flutter constitute the SDK

1, highly optimized for mobile applications 2D rendering engine, but also have excellent writing support capabilities;

2, modern React style framework ;

3, for rich Widget Android and iOS;

4, a unit of the API and integration testing;

5, a third party SDK for the connection system and interoperability and plug the API;

6, no interface (headless) test runner, used to run tests on Windows, Linux and Mac;

7, command-line tool, used to create, build, test, and compile the application;

Five, Flutter construction principle

Flutter using C, C ++, Dart and Skia (2D rendering engine) to build, as shown below:

Six, Flutter run on Android

Engine C, C ++ code is compiled using the Android NDK. Dart code is pre (Ahead Of Time, AOT) compiled to ARM and x86 libraries. These libraries are included in a Android "runner" project, then the entire contents are compiled into a APK. When the application starts, it will load Flutter library. Any rendering, event handling and other input or will delegate to the compiled application code and Flutter. This mechanism is quite similar to many game engines.

Use the virtual machine to run the code Dart (This displays the "Debug" words to remind developers speed will be slightly slower), so that we can enable debug mode when there is a thermal overload state (Stateful Hot Reload) .

Seven, Flutter running on iOS

Engine C, C ++ code uses LLVM iOS to be compiled. Dart code is pre (Ahead Of Time, AOT) compiled to native ARM libraries. These libraries are included in a iOS "runner" project, then the entire contents are compiled into a ipa. When the application starts, it will load Flutter library. Any rendering, event handling and other input or will delegate to the compiled application code and Flutter.

 

Published 63 original articles · won praise 179 · views 180 000 +

Guess you like

Origin blog.csdn.net/u011686167/article/details/90145660