Skip to content

Commit 65deabf

Browse files
feat: create new web example
1 parent 635a7a7 commit 65deabf

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed
5.46 KB
Loading
20.5 KB
Loading

example/web/index.html

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
The path provided below has to start and end with a slash "/" in order for
99
it to work correctly.
1010
11-
Fore more details:
11+
For more details:
1212
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
13+
14+
This is a placeholder for base href that will be replaced by the value of
15+
the `--base-href` argument provided to `flutter build`.
1316
-->
14-
<base href="/">
17+
<base href="$FLUTTER_BASE_HREF">
1518

1619
<meta charset="UTF-8">
1720
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
@@ -30,16 +33,6 @@
3033
<link rel="manifest" href="manifest.json">
3134
</head>
3235
<body>
33-
<!-- This script installs service_worker.js to provide PWA functionality to
34-
application. For more information, see:
35-
https://developers.google.com/web/fundamentals/primers/service-workers -->
36-
<script>
37-
if ('serviceWorker' in navigator) {
38-
window.addEventListener('flutter-first-frame', function () {
39-
navigator.serviceWorker.register('flutter_service_worker.js');
40-
});
41-
}
42-
</script>
43-
<script src="main.dart.js" type="application/javascript"></script>
36+
<script src="flutter_bootstrap.js" async></script>
4437
</body>
4538
</html>

example/web/manifest.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818
"src": "icons/Icon-512.png",
1919
"sizes": "512x512",
2020
"type": "image/png"
21+
},
22+
{
23+
"src": "icons/Icon-maskable-192.png",
24+
"sizes": "192x192",
25+
"type": "image/png",
26+
"purpose": "maskable"
27+
},
28+
{
29+
"src": "icons/Icon-maskable-512.png",
30+
"sizes": "512x512",
31+
"type": "image/png",
32+
"purpose": "maskable"
2133
}
2234
]
2335
}

0 commit comments

Comments
 (0)