domesticmouse 2 years ago
parent f451ee73ae
commit 0c1832d159

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "aa02b244f8f0e8d92901fca20bc77f79",
"/": "aa02b244f8f0e8d92901fca20bc77f79",
"index.html": "0762919ca738d3a7987f028db89d3a33",
"/": "0762919ca738d3a7987f028db89d3a33",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "80d97cf3073b21a73fa955bcf5ba1968",
"manifest.json": "68625bab86590a7ebe9e384ad0eedabd",

@ -34,7 +34,7 @@
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = '1341036996';
var serviceWorkerVersion = '191261969';
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "740c9c828627ef894cc1fe2c09e80fe8",
"/": "740c9c828627ef894cc1fe2c09e80fe8",
"index.html": "5456e0f88d47b655f2dbd084fafebf7f",
"/": "5456e0f88d47b655f2dbd084fafebf7f",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "74b10727c20057ec052faf00e7680880",
"manifest.json": "4d05609ff620f8861ca20119a9dc92fd",

@ -33,7 +33,7 @@
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = '1435316104';
var serviceWorkerVersion = '3817397293';
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "a277ec15192e55bbe0e359a4e2e374d8",
"/": "a277ec15192e55bbe0e359a4e2e374d8",
"index.html": "8fea21cdbc4b3620f8f003728e5a8a65",
"/": "8fea21cdbc4b3620f8f003728e5a8a65",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "6d3ca9e385cde0a38e8c47fc444d38b2",
"manifest.json": "d3e8be9819697c196251e6e977053336",

@ -37,7 +37,7 @@
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = '3422224108';
var serviceWorkerVersion = '4290051074';
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "ef4262aababc27d2d24e0660307908e5",
"/": "ef4262aababc27d2d24e0660307908e5",
"index.html": "8c2cb3e8fe43da756eab529dc54a1404",
"/": "8c2cb3e8fe43da756eab529dc54a1404",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "498d16ffdfe3dc8aa7e28177586f55f7",
"manifest.json": "05f725318f41bf1601ead9ffa9355535",

@ -37,7 +37,7 @@
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = '193152434';
var serviceWorkerVersion = '3592632615';
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {

@ -7,14 +7,16 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "37d124296f1edfb7b22bd9450b1d3278",
"/": "37d124296f1edfb7b22bd9450b1d3278",
"index.html": "5a4c89f9a740c0cd3fe6ddbaa9d1d5db",
"/": "5a4c89f9a740c0cd3fe6ddbaa9d1d5db",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "719b52efdd33c349388f07e8f0c9bc16",
"manifest.json": "5d94931eac503e97b830d7f00bdbc4ba",
"manifest.json": "b3e6ffc626a7ddc3a2a95f62ee423a43",
"version.json": "9c336dc978923faadf6aa0ad75d0ea12",
"flutter.js": "eb2682e33f25cd8f1fc59011497c35f8",
"icons/Icon-maskable-512.png": "301a7604d45b3e739efc881eb04896ea",
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"icons/Icon-maskable-192.png": "c457ef57daa1d16f64b27b786ec2ea3c",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57",
"assets/NOTICES": "29e288f2439cf00422572b4bb2d3a4be",

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -10,6 +10,9 @@
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="/samples/web/navigation_and_routing/">
@ -20,79 +23,36 @@
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="bookstore">
<meta name="apple-mobile-web-app-title" content="navigation_and_routing">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<title>bookstore</title>
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>navigation_and_routing</title>
<link rel="manifest" href="manifest.json">
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = '795168248';
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = '4086691189';
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
return;
}
scriptLoaded = true;
var scriptTag = document.createElement('script');
scriptTag.src = 'main.dart.js';
scriptTag.type = 'application/javascript';
document.body.append(scriptTag);
}
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
navigator.serviceWorker.register(serviceWorkerUrl)
.then((reg) => {
function waitForActivation(serviceWorker) {
serviceWorker.addEventListener('statechange', () => {
if (serviceWorker.state == 'activated') {
console.log('Installed new service worker.');
loadMainDartJs();
}
});
}
if (!reg.active && (reg.installing || reg.waiting)) {
// No active web worker and we have installed or are installing
// one for the first time. Simply wait for it to activate.
waitForActivation(reg.installing ?? reg.waiting);
} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
// When the app updates the serviceWorkerVersion changes, so we
// need to ask the service worker to update.
console.log('New service worker available.');
reg.update();
waitForActivation(reg.installing);
} else {
// Existing service worker is still good.
console.log('Loading app from service worker.');
loadMainDartJs();
}
});
// If service worker doesn't succeed in a reasonable amount of time,
// fallback to plaint <script> tag.
setTimeout(() => {
if (!scriptLoaded) {
console.warn(
'Failed to load app from service worker. Falling back to plain <script> tag.',
);
loadMainDartJs();
}
}, 4000);
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
}
}).then(function(engineInitializer) {
return engineInitializer.initializeEngine();
}).then(function(appRunner) {
return appRunner.runApp();
});
} else {
// Service workers not supported. Just drop the <script> tag.
loadMainDartJs();
}
});
</script>
</body>
</html>

@ -1,6 +1,6 @@
{
"name": "bookstore",
"short_name": "bookstore",
"name": "navigation_and_routing",
"short_name": "navigation_and_routing",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
@ -18,6 +18,18 @@
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "58da19f223d7c7c7c4beec651e471358",
"/": "58da19f223d7c7c7c4beec651e471358",
"index.html": "564a1822bda3a33313329785b94c3495",
"/": "564a1822bda3a33313329785b94c3495",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "ec5104c65c0f7b2e40351141dd221e1f",
"manifest.json": "470be0990b1a9c5a9011c08ba3d78e79",

@ -34,7 +34,7 @@
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = '1617977607';
var serviceWorkerVersion = '2860827404';
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>

@ -7,8 +7,8 @@ const RESOURCES = {
"canvaskit/profiling/canvaskit.wasm": "95e736ab31147d1b2c7b25f11d4c32cd",
"canvaskit/canvaskit.js": "c2b4e5f3d7a3d82aed024e7249a78487",
"canvaskit/canvaskit.wasm": "4b83d89d9fecbea8ca46f2f760c5a9ba",
"index.html": "f454b6b01d8cf97ad7aef89e6ac0b095",
"/": "f454b6b01d8cf97ad7aef89e6ac0b095",
"index.html": "e2c19bfa721603b94898f106e0f1ecf7",
"/": "e2c19bfa721603b94898f106e0f1ecf7",
"favicon.png": "5dcef449791fa27946b3d35ad8803796",
"main.dart.js": "2abe02a889f06c62459cc57a6658e9c1",
"manifest.json": "fcc4cffd0f45ba41f31bdd5e05ca1ded",

@ -34,7 +34,7 @@
<script>
// The value below is injected by flutter build, do not touch.
var serviceWorkerVersion = '2974693542';
var serviceWorkerVersion = '3185499484';
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>

Loading…
Cancel
Save