Skip to content

Commit c97c2b7

Browse files
committed
refactor(web): update index.html for improved Flutter initialization
- Remove flutter_bootstrap_js script - Add event listener for window load event - Implement custom Flutter initialization logic - Improve code structure and readability
1 parent cc49819 commit c97c2b7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

web/index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,18 @@
131131
<div id="splash-container" class="center">
132132
<div class="loader"></div>
133133
</div>
134+
<script src="flutter.js" defer></script>
134135
<script>
135-
{ { flutter_bootstrap_js } }
136+
window.addEventListener('load', function () {
137+
_flutter.loader.loadEntrypoint({
138+
onEntrypointLoaded: function (engineInitializer) {
139+
engineInitializer.initializeEngine().then(function (appRunner) {
140+
appRunner.runApp();
141+
});
142+
}
143+
});
144+
});
136145
</script>
137-
138-
139-
140-
141146
</body>
142147

143-
</html>
148+
</html>

0 commit comments

Comments
 (0)