Skip to content

Commit 780488e

Browse files
committed
chore: recreate index.html in example with flutter create
1 parent 8985807 commit 780488e

File tree

4 files changed

+56
-15
lines changed

4 files changed

+56
-15
lines changed

packages/package_info_plus/package_info_plus/example/.metadata

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
8-
channel: stable
7+
revision: "ba393198430278b6595976de84fe170f553cc728"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
17-
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
16+
create_revision: ba393198430278b6595976de84fe170f553cc728
17+
base_revision: ba393198430278b6595976de84fe170f553cc728
18+
- platform: android
19+
create_revision: ba393198430278b6595976de84fe170f553cc728
20+
base_revision: ba393198430278b6595976de84fe170f553cc728
21+
- platform: ios
22+
create_revision: ba393198430278b6595976de84fe170f553cc728
23+
base_revision: ba393198430278b6595976de84fe170f553cc728
24+
- platform: linux
25+
create_revision: ba393198430278b6595976de84fe170f553cc728
26+
base_revision: ba393198430278b6595976de84fe170f553cc728
27+
- platform: macos
28+
create_revision: ba393198430278b6595976de84fe170f553cc728
29+
base_revision: ba393198430278b6595976de84fe170f553cc728
30+
- platform: web
31+
create_revision: ba393198430278b6595976de84fe170f553cc728
32+
base_revision: ba393198430278b6595976de84fe170f553cc728
1833
- platform: windows
19-
create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
20-
base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1
34+
create_revision: ba393198430278b6595976de84fe170f553cc728
35+
base_revision: ba393198430278b6595976de84fe170f553cc728
2136

2237
# User provided section
2338

5.46 KB
Loading
20.5 KB
Loading
Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<!--
5+
If you are serving your web app in a path other than the root, change the
6+
href value below to reflect the base path you are serving from.
7+
8+
The path provided below has to start and end with a slash "/" in order for
9+
it to work correctly.
10+
11+
For more details:
12+
* 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`.
16+
-->
17+
<base href="$FLUTTER_BASE_HREF">
18+
419
<meta charset="UTF-8">
520
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
621
<meta name="description" content="A new Flutter project.">
@@ -16,18 +31,29 @@
1631

1732
<title>example</title>
1833
<link rel="manifest" href="manifest.json">
34+
35+
<script>
36+
// The value below is injected by flutter build, do not touch.
37+
const serviceWorkerVersion = null;
38+
</script>
39+
<!-- This script adds the flutter initialization JS code -->
40+
<script src="flutter.js" defer></script>
1941
</head>
2042
<body>
21-
<!-- This script installs service_worker.js to provide PWA functionality to
22-
application. For more information, see:
23-
https://developers.google.com/web/fundamentals/primers/service-workers -->
2443
<script>
25-
if ('serviceWorker' in navigator) {
26-
window.addEventListener('load', function () {
27-
navigator.serviceWorker.register('flutter_service_worker.js');
44+
window.addEventListener('load', function(ev) {
45+
// Download main.dart.js
46+
_flutter.loader.loadEntrypoint({
47+
serviceWorker: {
48+
serviceWorkerVersion: serviceWorkerVersion,
49+
},
50+
onEntrypointLoaded: function(engineInitializer) {
51+
engineInitializer.initializeEngine().then(function(appRunner) {
52+
appRunner.runApp();
53+
});
54+
}
2855
});
29-
}
56+
});
3057
</script>
31-
<script src="main.dart.js" type="application/javascript"></script>
3258
</body>
3359
</html>

0 commit comments

Comments
 (0)