From f461be131ab241179ddb71bf54f43faf9becc054 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Mon, 14 Oct 2024 14:37:18 -0700 Subject: [PATCH] Add flutter_bootstrap.js --- {{cookiecutter.out_dir}}/web/flutter_bootstrap.js | 12 ++++++++++++ {{cookiecutter.out_dir}}/web/index.html | 4 +--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 {{cookiecutter.out_dir}}/web/flutter_bootstrap.js diff --git a/{{cookiecutter.out_dir}}/web/flutter_bootstrap.js b/{{cookiecutter.out_dir}}/web/flutter_bootstrap.js new file mode 100644 index 0000000..1c995c3 --- /dev/null +++ b/{{cookiecutter.out_dir}}/web/flutter_bootstrap.js @@ -0,0 +1,12 @@ +{{ '{{flutter_js}}' }} +{{ '{{flutter_build_config}}' }} + +_flutter.loader.load({ + serviceWorkerSettings: { + serviceWorkerVersion: {{ '{{flutter_service_worker_version}}' }}, + }, + onEntrypointLoaded: async function (engineInitializer) { + const appRunner = await engineInitializer.initializeEngine({useColorEmoji: useColorEmoji}); + await appRunner.runApp(); + } +}); \ No newline at end of file diff --git a/{{cookiecutter.out_dir}}/web/index.html b/{{cookiecutter.out_dir}}/web/index.html index 2639fa9..e2e81d7 100644 --- a/{{cookiecutter.out_dir}}/web/index.html +++ b/{{cookiecutter.out_dir}}/web/index.html @@ -33,9 +33,7 @@ - + \ No newline at end of file