Skip to content

Commit

Permalink
Migrate to new Flutter JS initialization (#1752)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored Oct 10, 2024
1 parent 2b28620 commit 6704a1d
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions website/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@

<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="index.css" type="text/css" media="screen,projection">

<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>

<body>
Expand All @@ -64,21 +57,7 @@
<div class="double-bounce2"></div>
</div>

<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function (engineInitializer) {
engineInitializer.initializeEngine().then(function (appRunner) {
appRunner.runApp();
});
}
});
});
</script>
<script src="flutter_bootstrap.js" async></script>
</body>

</html>

0 comments on commit 6704a1d

Please sign in to comment.