Flutter builds apps for any screen

Flutter

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.
Flutter code compiles to ARM or Intel machine, using Dart programming language, for fast performance on any device.
Deploy to multiple devices from a single codebase: mobile, web, desktop, and embedded devices.

On Linux platforms, Flutter can be used on top of several graphic back-ends like DRM and Wayland.

Flutter demo on i.MX6DL

In this photo taken during Embedded World 2023 in Nuremberg, Germany we are running the Flutter demo application with Linux embedded generated with Yocto Project on a board with NXP based system i.MX6DL.

Build Flutter using Yocto Project

To build a Flutter-enabled Linux distribution, you need several Yocto layers:

  • The poky layer, containing the base content of openembedded-core
  • The meta-flutter layer, which contains all the Flutter related recipes
  • The meta-clang layer, which is needed by the meta-flutter layer, as Flutter is built using the Clang compiler
  • The metalayer for your MACHINE you are using, provided by the silicon vendor

Add flutter-gallery recipe into your image and build with bitbake.

IMAGE_INSTALL:append = " flutter-pi flutter-gallery"

Launch a Flutter application

One you have the final system installed on your board, it is possible to start the Flutter Gallery application which is part of the core-image-minimal image, together with the Flutter stack.

flutter-pi --release /usr/share/flutter/gallery/3.3.10/release/

Share this post: