Windows Platform Embedder

This code is the glue between the Flutter engine and the Windows platform. It is responsible for:

  1. Launching the Flutter engine.
  2. Providing a view for the Flutter engine to render into.
  3. Dispatching events to the Flutter engine.

For more information on embedders, see the Flutter architectural overview.

[!CAUTION] This is a best effort attempt to document the Windows embedder. It is not guaranteed to be up to date or complete. If you find a discrepancy, please send a pull request!

See also:

  1. Flutter tool's Windows logic - Builds and runs Flutter Windows apps on the command line.
  2. Windows app template - The entrypoint for Flutter Windows app. This launches the Windows embedder.
  3. platform-windows GitHub issues label
  4. #hackers-desktop Discord channel

Developing

See:

  1. Setting up the Engine development environment
  2. Compiling for Windows
  3. Debugging Windows builds with Visual Studio

Notable files

Some notable files include:

  1. flutter_windows_engine.h - Connects the Windows embedder to the Flutter engine.
  2. flutter_windows_view.h - The logic for a Flutter view.
  3. flutter_window.h - Integrates a Flutter view with Windows (using a win32 child window).
  4. //shell/platform/embedder/embedder.h - The API boundary between the Windows embedder and the Flutter engine.