tree: 39aac902c458b87dddc6722e992c5266fff17906 [path history] [tgz]
  1. animation_example/
  2. hello_dart/
  3. hello_flutter/
  4. BUILD.bazel

Flutter embedder examples

These are example apps that can be used to manually test the behavior of the Flutter embedder.

TODO(akbiggs): Write integration tests that automatically verify the behavior of these example apps on each commit.

How to run an example

Follow the setup in the root README, then run from $FUCHSIA_EMBEDDER_DIR:

scripts/ <example_folder_name>

For example:

scripts/ hello_flutter

If the example is marked as Headless in the table below, run the example with the --headless flag to turn off rendering because the component does not support rendering (it is a Dart app with no UI instead of a Flutter app). For example:

scripts/ hello_dart --headless

This script relies on the fuchsia_package BUILD rule for the example being called <example_folder_name>_pkg.

TODO(akbiggs): Migrate this workflow to Bazel and remove The ideal workflow is $FUCHSIA_EMBEDDER_DIR/tools/bazel run //src/examples/my_example/my_example_pkg because it's consistent with other platforms and discoverable.

TODO(akbiggs): Headless examples will not work yet because there's no environment with the JIT allowlist to run them in. Find a suitable collection somewhere and run them there. For now, you can run without --headless, which will lead to an infinite loading spinner but run the app.

Example catalog

ExampleHeadless?Desired behaviorDoes it work?
animation_exampleNoRenders glowing square without jankJanky (renders animation with glitches)
hello_dartYesPrints “Hello World!” to ffx logYes
hello_flutterNoRenders with clickable buttonYes