Impeller, the New Flutter Rendering Engine

What Is the Rendering Engine?

The Flutter engine represents the core component of the Flutter framework responsible for rendering the user interface (UI) and displaying it on the screen. It maintains a tree of rendered objects, such as widgets and layouts, which are responsible for defining their own layout, painting their visual representation, and handling input events. The rendering engine in Flutter performs two main processes: layout and paint. In the layout phase, the engine analyzes the render object tree to determine the size and position of each element/object based on the constraints provided by the parent. Once the layout phase is complete, the engine analyzes the tree again, instructing each render object to paint itself onto a canvas.

The rendering engine in Flutter takes advantage of hardware acceleration and optimizes performance by minimizing unnecessary repaints. This allows for high-performance graphics rendering and smooth animations. By leveraging the capabilities of the rendering engine, Flutter enables developers to create fast and fluid user interfaces across different platforms and devices.

Platform Channel in Flutter — Benefits and Limitations

One of the biggest challenges for mobile cross-platform frameworks is how to achieve native performance and how to help developers create different kinds of features for different devices and platforms with as little effort as possible. In doing so, we need to keep in mind that UX should remain the same but with unique components that are specific for each particular platform (Android and iOS).

Although cross-platform frameworks (in most of these cases) can resolve platform-specific tasks, there is a certain number of tasks which, with custom platform-specific code, can be achieved only through native. The question is, how can those frameworks establish communication between the specific platform and application? The best example is the Flutter's Platform Channel.

Android App Architecture Part 2: Domain Layer

In the previous article, we talked about the basics of Clean Architecture, MVVM, and app modularization. Then, we created a sample WeatherApp with initial package structure (core, WeatherApp, data, domain, feature, navigation module, Gradle files, etc.).

In this article, I’ll take you through the process of creating the first feature for data parsing from local JSON that’ll display the results to the user. We can simply call this feature weather.

Android App Architecture: Modularization, Clean Architecture, MVVM

Clean architecture is key

Based on my experience on previous projects, I decided to write an article on how to properly set up the base architecture of an android app which can be easily extended and applied to different kinds of applications.

The key concept that I’ll analyze in this series of articles involves the combination of Clean Architectureapp modularization and MVVM design pattern in creating modular, scalable and testable android application. For that purpose, I created a demo application called WeatherApp that will demonstrate this approach.