With the advent of 5G, edge computing, cloud and autonomous driving, the traditional cockpit has transformed into a digital product. In this context, ‘digital cockpit’ refers to the digital experience within the automobile incorporating multiple screens and multiple systems for drivers and passengers.Ìý
Ìý
Digital cockpits can potentially transform how humans interact with their automobiles. However, for this to happen, a clear, intuitive and easy-to-use user interface (UI) is fundamental. In this article, we explore Flutter’s place as the UI development platform for digital cockpits and user-friendly human-machine interfaces (HMI).
Ìý
What is Flutter?
Flutter is an open-source UI development framework developed by Google. Flutter offers developers the ability to build beautiful, natively-compiled, multi-platform applications from a single code base. It also supports custom embedders, which means it can work on any platform.
Ìý
Here are some of the key features of Flutter:
Ìý
Layered architecture: Flutter provides a clean interface for custom embedders to power apps on new hardware and operating systems.
Portable code: Flutter uses Dart as its programming language. Since Dart is portable, Flutter can use the same rendering stack no matter which embedder spins it up, maximizing code reuse.
Compatibility with native code: Flutter's platform channels can put a single Dart interface on native code for mobile, web, desktop, or an embedded platform.
Ìý
Here’s what the layered architecture, which supports multi-platform development, should look like:
Ìý
How Flutter works
Figure 1: Flutter architectural overview
Ìý
To the underlying operating system, Flutter applications are packaged in the same way as any other native application. A platform-specific embedder provides an entry point and coordinates with the operating system to gain access to services like rendering surfaces, accessibility and input. It also manages the message-event loop.
Ìý
The embedder is written in a language appropriate for the platform — Java and C++ for Android, Objective-C/Objective-C++ for iOS and macOS, and C++ for Windows and Linux.Ìý
Ìý
Flutter code can be embedded into an existing application as a module, or it can be the entire application content. Flutter includes several embedders for common target platforms, but others also exist. For example, custom embedders are available for devices like Raspberry Pi, developed by other communities such as and .
Ìý
Flutter for automotive applications
Ìý
While developing for the digital cockpit, there are specific safety and security standards that need to be followed. For example, as per the , the digital cockpit system should not cause any driver distraction and should always ensure the driver’s safety behind the wheels.Ìý
.Ìý
In addition to application design and development, system architecture also plays an important role in ensuring safety. This includes the operating system, hardware platforms etc.
Ìý
Due to its layered architecture, the flutter applications can be easily ported to various platforms. Custom embedders can be created based on the platform requirements .So we just need to use flutter on top of our desired operating system and hardware platform by making use of custom embedders.However for safety critical applications like instrument cluster, real time operating systems are preferred. The availability of community resources, documentation and libraries specifically tailored for Flutter on real time operating systems may be limited. Ensuring compatibility and optimal performance might require additional effort. So using flutter for such applications (like instrument cluster) might be difficult.
Ìý
Security researchers have demonstrated that they can connect to a vehicle’s powertrain and other critical systems via the infotainment interface. This is why security is vital to designing in-vehicle interfaces. Flutter provides a consistent user interface framework across different platforms. This helps to maintain an unified approach to security and reduces the risk of security vulnerabilities caused due to platform specific UI implementations. Using flutter also helps in managing security updates in multiple platforms easily. Flutter also benefits from regular updates and contributions from a larger developer community. Any vulnerabilities in the framework are likely to be addressed quickly.
Ìý
Why choose a new framework
Ìý
It’s natural to question the need for a new framework when there is already a set of established tools.However when it comes to modern streamlined development requirements not all tools may meet the criteria.
Ìý
In today’s fast paced and competitive software development landscape, features like automation tooling, faster iteration and rapid prototyping and experimentation also play a major role in addition to cross platform capability. The need for modern development tools like Flutter arises from the fact that they empower developers to build high quality applications more effectively and efficiently, keeping up with the demands of the rapidly evolving software development landscape.
Ìý
Why Flutter for digital cockpits
Ìý
So why use Flutter in digital cockpits? There are lots of reasons:
Ìý
Speed: Flutter code compiles to ARM or Intel machine code and JavaScript, delivering fast performance on any device. Features like AOT compilation provides the consistency required for in-vehicle technology.
Ìý
Productivity: Flutter’s ‘Hot Reload’ helps build and iterate quickly. The code gets updated for changes to be viewed instantly, enabling a faster development workflow.
Ìý
Multi-platform capabilities: Flutter is platform-agnostic and makes cross-platform development simple. Instead of creating separate code for each platform, Flutter apps can be built for mobile, web, desktop and embedded devices from a single codebase.
Ìý
Performant by design: Flutter gives the power of hardware-accelerated graphics for performant apps on any platform. Its rendering engine provides exemplary performance in constrained environments.
Ìý
Ready-to-use widgets: Flutter contains various ready-to-use widgets that can be used directly or with modifications.
Ìý
Customizability: The Flutter rendering engine allows the users to control every pixel, and its widget library adapts to any screen.Ìý
Ìý
End-user experience: IVI and instrument cluster applications built with Flutter can match the look and feel of mobile apps. Flutter also does a great job of packaging touch mechanics.
Ìý
Developer ergonomics: Even if the apps are released on a single target platform, Flutter’s multi-platform support can be helpful during design and development.Ìý
Ìý
Faster iteration: Flutter offers high productivity with a relatively low entry barrier, allowing automakers to create a tighter feedback loop in their design and engineering processes.Ìý
Ìý
Large Talent Pool: Traditionally developing HMI’s for automotive systems has been a specialized field requiring knowledge of specific frameworks and tools. Adoption of Flutter in the automotive industry opens up opportunities for a large community of mobile app developers.The learning curve for Dart(which is the programming language used in Flutter framework)Ìý is relatively gentle for developers coming from languages like Java, Javascript or C#. The language’s simplicity and readability contributes to the ease of learning Flutter.
Ìý
Flutter opens up immense potential with Fuchsia: Fuchsia is a modern general-purpose, open-source operating system developed by Google, designed for a diverse hardware and software ecosystem and not based on Linux. It is simple, secure, updatable and performant.Ìý
Ìý
The ​​Fuchsia OS is capable of running an entire Flutter app written using Dart. Google's devices are already powered by Fuchsia OS, and the end-user devices' UI was created using Flutter.
Ìý
Conclusion
Ìý
Flutter is relatively new in the industry, so whether it will stand the test of time remains to be seen; it’s not yet widely used in embedded platforms. To address this, it will be important to collaborate with automotive experts, and keep abreast with industry standards to ensure that the use of Flutter ensures quality and reliability.
Ìý
Despite these challenges, for HMI applications of an automobile, Flutter is a dependable and capable UI toolkit with an established SDK. So, it’s no surprise that to develop its in-vehicle infotainment system and .Ìý
Ìý
Flutter makes it easy to create great apps that work across different platforms inÌý the cockpit.ItÌý combinesÌý alluring, rapid user experiences with an efficient development environment. Even though Fuchsia OS is not widely used yet, if it spreads to digital cockpit systems in the future, expertise in Flutter will be a competitive advantage, given the Flutter-Fuchsia combination is supported by Google as well.
Ìý
Disclaimer: The statements and opinions expressed in this article are those of the author(s) and do not necessarily reflect the positions of ºÚÁÏÃÅ.