Architectural Layers
1. Framework
The flutter framework is the first layer of the architecture. Developers interact through this framework layer, As you can see in the image it includes the different types of platforms, layouts, libraries and this provides a modern, reactive framework that is written in Dart Language.
- With the help of Material and Cupertino libraries with this layer developer is interacting more and create responsive UI with different UI for the different OS.
- The Widget layer In Flutter, everything is a widget, which is the core concept of this framework. Widget is basically a user interface component that affects and controls the view and interface of the application. Infect the whole flutter App is Widget and it contains the child widgets. This type of structure helps you to create simple UI to Complex UI.
- Flutter provide us Rendering Tree which Render Object hierarchy helps you in painting-back widgets. It means You can manipulate these objects dynamically, with the tree automatically updating the layout to reflect your changes.
- Dart:ui library provide us animation, Painting, a gesture which helps you to create a different type of custom UI, using gesture build the gesture base Applications like Drag(), PointerEvents(), OnTap() any many more, with the use of Painting library create the painting scaled images, interpolating between shadows, painting borders around boxes and many more things in Application.
2. Engine
- In this service protocol give access to information about the service protocol and control the webserver. It provides you the composition which means with the use of simple objects you can create complex ones as an example, with the use of simple widgets you can create complex widgets.
- Platform channel means Flutter allows you to call platform-specific APIs whether available in kotlin or Java code on Android, or in Swift or Objective-C code on iOS.
- Dart code is executed in Isolate. A Dart Isolate is an object that executes a specific function in a newly created thread then the second thread can communicate with the main thread continuously. The new isolate gets its own event loop and its own memory, which the original isolate. the only way that isolates can work together is by passing messages back and forth. One isolate sends a message to the other, and the receiving isolate processes that message using its event loop.
3. Embedder
- Render surface setup rendering pipeline, these are the steps that Flutter takes to convert a hierarchy of widgets into the actual pixels painted onto a screen.
- Flutter provide us native plugins for Android and iOS Os with the help of the native plugin we can run the native code in different Os.
- According to the functionality, we can categorize the package into two types:
1. Dart Package
- It is a general package, which is written in the dart language, such as a path package. This package can be used in both the platform, either it is a web or mobile.
- Some of these might contain Flutter-specific functionality and thus have a dependency on the Flutter framework.
2. Plugin Package
- Dart package that contains an API written in Dart code combined with one or more platform-specific implementations.
Plugin packages can be written for Android using Kotlin or Java code, iOS using Swift or Objective-C code, web, macOS, Windows, or Linux, or any combination of this.
Thank you for taking the time to write such an informative post. Your blog is not only informative, but it is also very creative
ReplyDeleteandroid app development cost