Skip to content

Instantly share code, notes, and snippets.

@Aditsyal
Last active December 5, 2022 11:03
Show Gist options
  • Save Aditsyal/45f003d0cc1ea4a908c95f96ffcac2a4 to your computer and use it in GitHub Desktop.
Save Aditsyal/45f003d0cc1ea4a908c95f96ffcac2a4 to your computer and use it in GitHub Desktop.
<html>
<head>
<!-- ... -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function (ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
}).then(function (engineInitializer) {
// Initialize the Flutter engine
return engineInitializer.initializeEngine();
}).then(function (appRunner) {
// Run the app
return appRunner.runApp();
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment