Skip to content
Blog

Building Custom Flutter Embedders for Embedded Linux Systems

A technical overview of building custom C++ embedders to run Flutter on specialized embedded Linux hardware, micro-controllers, and custom SoC platforms.

Published on • November 1, 2026

AI Assistant

One of Flutter’s most powerful architectural characteristics is the clean separation between the Dart Framework, the C++ Engine, and the platform-specific Embedder. While standard targets like Android, iOS, Windows, macOS, and Linux are officially maintained by Google, developers can write their own custom embedder to bring Flutter to virtually any hardware platform (github.com/topics/flutter).

This article outlines how custom embedders work and the low-level contracts required to render Flutter on tailored embedded Linux systems.

The Embedder API: The C Interface

The Flutter Engine exposes a stable C header (embedder.h). Any C/C++ application can include this header and launch a Flutter engine instance via FlutterEngineRun. The embedder is responsible for fulfilling three primary contracts:

1. Graphics Context Initialization

The embedder must provide a rendering surface:

  • EGL / DRM / KMS: For headless Linux systems without an X11 or Wayland compositor, the embedder configures the Direct Rendering Manager (DRM) and Kernel Mode Setting (KMS) to obtain an accelerated hardware framebuffer.
  • Vulkan / OpenGL ES Callbacks: The embedder registers callbacks for frame presentation, swap buffers, and context switching.

2. Task Runner & Event Loop Integration

Flutter requires two main threads:

  • Platform Thread: Handles native platform lifecycle, timers, and input dispatching.
  • Render/Raster Thread: Executes GPU command lists and coordinates hardware VSync signals.

Custom embedders must wire Flutter’s task runner callbacks into the host operating system’s event loop (e.g., epoll or glib).

3. Input & Platform Message Dispatch

The embedder translates raw hardware input—such as Linux /dev/input/event* devices for multi-touch panels, mice, or rotary knobs—into FlutterPointerEvent structs and passes them into the engine.

Real-World Applications

Custom embedders power kiosks in transportation hubs, medical monitoring instruments, avionics prototypes, and custom smart home controllers. By understanding the embedder API, engineers can bring rich 60 FPS interfaces to dedicated embedded systems with remarkable speed.