|
|
@ -20,9 +20,6 @@
|
|
|
|
<title>Element embedding</title>
|
|
|
|
<title>Element embedding</title>
|
|
|
|
<link rel="manifest" href="manifest.json" />
|
|
|
|
<link rel="manifest" href="manifest.json" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- This script adds the flutter initialization JS code -->
|
|
|
|
|
|
|
|
<script src="flutter.js" defer></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
@ -81,17 +78,17 @@
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
window.addEventListener("load", function (ev) {
|
|
|
|
{{flutter_js}}
|
|
|
|
// Embed flutter into div#flutter_target
|
|
|
|
{{flutter_build_config}}
|
|
|
|
let target = document.querySelector("#flutter_target");
|
|
|
|
|
|
|
|
_flutter.loader.loadEntrypoint({
|
|
|
|
const target = document.getElementById('flutter_target');
|
|
|
|
onEntrypointLoaded: async function (engineInitializer) {
|
|
|
|
_flutter.loader.load({
|
|
|
|
let appRunner = await engineInitializer.initializeEngine({
|
|
|
|
onEntrypointLoaded: async function (engineInitializer) {
|
|
|
|
hostElement: target,
|
|
|
|
const appRunner = await engineInitializer.initializeEngine({
|
|
|
|
});
|
|
|
|
hostElement: target,
|
|
|
|
await appRunner.runApp();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
await appRunner.runApp();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<script src="js/demo-js-interop.js" defer></script>
|
|
|
|
<script src="js/demo-js-interop.js" defer></script>
|
|
|
|