The Flutter Embedder for Fuchsia is a new in-progress runtime for Flutter apps on Fuchsia. This runtime is built on top of Flutter's embedder platform.
This repository is a work in progress and should be considered experimental.
$FUCHSIA_EMBEDDER_DIR to your flutter-embedder.git checkout location, for example
Bootstrap the repository's dependencies:
This script initializes tools (including
ffx), installs some Git hooks and downloads the
workstation_eng.qemu-x64 product bundle, which you can use to run the examples below.
Start the emulator.
If running in a graphical environment:
$FUCHSIA_EMBEDDER_DIR/tools/ffx emu start workstation_eng.qemu-x64
If running in a terminal environment:
$FUCHSIA_EMBEDDER_DIR/tools/ffx emu start --headless workstation_eng.qemu-x64
(optional) Watch the device log in a separate window:
Run an example app:
TODO(akbiggs): The app occasionally gets stuck on a loading screen instead of rendering. Re-running the app usually fixes it. We need to fix this.
Occasionally you will need to update the Flutter Engine artifacts (
libengine_flutter.so) that are used by the embedder to run Flutter apps. A script is provided for this workflow.
$ENGINE_DIR to the
src folder of your Flutter Engine checkout location, for example
$DEPOT_TOOLS should be set to your
depot_tools location, for example
git stash or
git commit any local changes to the Flutter Engine or the script will fail.
You can run the script with a
flutter/engine Git commit to sync the Engine artifacts to that revision.
A common workflow is to sync your Engine commit to the Flutter tool in this repository, for example when updating the Flutter tool to a new version. To do this:
$FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $(cat $FUCHSIA_EMBEDDER_DIR/third_party/dart-pkg/internal/flutter/flutter/bin/internal/engine.version)