Skip to content

Commit 6a7fae5

Browse files
committed
refactor(web): replace inline Dart script with external Flutter bootstrap
- Remove inline Dart script from index.html - Add async flutter_bootstrap.js script import - Simplify page loading process and improve performance
1 parent 935674c commit 6a7fae5

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

web/index.html

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,10 @@
117117
<div id="splash-container" class="center">
118118
<div class="loader"></div>
119119
</div>
120-
<script>
121-
{ { flutter_bootstrap_js } }
122-
{ { flutter_js } }
123-
{ { flutter_build_config } }
124-
window.addEventListener('load', function (ev) {
125-
_flutter.loader.load({
126-
onEntrypointLoaded: function (engineInitializer) {
127-
engineInitializer.initializeEngine().then(function (appRunner) {
128-
appRunner.runApp();
129-
});
130-
}
131-
});
132-
});
133-
</script>
120+
<script src="flutter_bootstrap.js" async></script>
134121

135122

136123

137124
</body>
138125

139-
</html>
126+
</html>

0 commit comments

Comments
 (0)