flutter-desktop-embedding – how to generate "build/flutter_assets"

Issue

Build https://github.com/google/flutter-desktop-embedding ok.

The embedding uses a build/flutter_assets from the Flutter project to embed. https://github.com/google/flutter-desktop-embedding/blob/master/linux/example/flutter_embedder_example.cc#L35

But how in a Flutter project is this generated?

with flutter build ?

Actually I managed to build build/flutter_assets once and the embedding worked (cool stuff), but now I can’t reproduce anymore, little strange.

Solution

The make of the linux lib executes a flutter build command of the example project.

Just picking this flutter build command generates build/flutter_assets in the flutter project to embed. The command is:

flutter build flx \
 --local-engine-src-path=../../engine/src \
 --local-engine=host_debug_unopt

Was solved by this issue https://github.com/google/flutter-desktop-embedding/issues/19

Answered By – Jonas Bojesen

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *