-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1addc75
commit b1a820f
Showing
23 changed files
with
64,445 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
96c4305e89b3ff525a1c1b6f5d143dbc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"assets/strings/emojis.txt":["assets/strings/emojis.txt"],"assets/images/icon.png":["assets/images/icon.png"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}] |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
😀😃😄😁😆😅🤣😂🙂🙃😉😊😇🥰😍🤩😘😗😚😙😋😛😜🤪😝🤑🤗🤭🤫🤔🤐🤨😐😑😶😏😒🙄😬🤥😌😔😪🤤😴😷🤒🤕🤢🤮🤧🥵🥶🥴😵🤯🤠🥳😎🤓🧐😕😟🙁😮😯😲😳🥺😦😧😨😰😥😢😭😱😖😣😞😓😩😫🥱😤😡😠🤬😈👿💀💩🤡👹👺👻👽👾🤖😺😸😹😻😼😽🙀😿😾💋👋🤚🖐✋🖖👌🤏🤞🤟🤘🤙👈👉👆🖕👇👍👎✊ |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
'use strict'; | ||
const MANIFEST = 'flutter-app-manifest'; | ||
const TEMP = 'flutter-temp-cache'; | ||
const CACHE_NAME = 'flutter-app-cache'; | ||
const RESOURCES = { | ||
"index.html": "22d78dce47d5ec59f32eef648a3b0e8e", | ||
"/": "22d78dce47d5ec59f32eef648a3b0e8e", | ||
"main.dart.js": "436750a5da1ce0eb5389756d5d9dc8f6", | ||
"favicon.png": "5dcef449791fa27946b3d35ad8803796", | ||
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1", | ||
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1", | ||
"manifest.json": "6cab850c802a5f0a9c498776281c2023", | ||
"assets/AssetManifest.json": "f72a9eb7fab5336883942f3704919bf4", | ||
"assets/NOTICES": "efd35fdaf5df2ba630652b76f2b48a1f", | ||
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57", | ||
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "115e937bb829a890521f72d2e664b632", | ||
"assets/fonts/MaterialIcons-Regular.otf": "a68d2a28c526b3b070aefca4bac93d25", | ||
"assets/assets/strings/emojis.txt": "0902d1a6a9a272505a556d76b23f2774", | ||
"assets/assets/images/icon.png": "c0a3fd3783193632d8f02e9a2b41cac5" | ||
}; | ||
|
||
// The application shell files that are downloaded before a service worker can | ||
// start. | ||
const CORE = [ | ||
"/", | ||
"main.dart.js", | ||
"index.html", | ||
"assets/NOTICES", | ||
"assets/AssetManifest.json", | ||
"assets/FontManifest.json"]; | ||
|
||
// During install, the TEMP cache is populated with the application shell files. | ||
self.addEventListener("install", (event) => { | ||
return event.waitUntil( | ||
caches.open(TEMP).then((cache) => { | ||
// Provide a 'reload' param to ensure the latest version is downloaded. | ||
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'reload'}))); | ||
}) | ||
); | ||
}); | ||
|
||
// During activate, the cache is populated with the temp files downloaded in | ||
// install. If this service worker is upgrading from one with a saved | ||
// MANIFEST, then use this to retain unchanged resource files. | ||
self.addEventListener("activate", function(event) { | ||
return event.waitUntil(async function() { | ||
try { | ||
var contentCache = await caches.open(CACHE_NAME); | ||
var tempCache = await caches.open(TEMP); | ||
var manifestCache = await caches.open(MANIFEST); | ||
var manifest = await manifestCache.match('manifest'); | ||
|
||
// When there is no prior manifest, clear the entire cache. | ||
if (!manifest) { | ||
await caches.delete(CACHE_NAME); | ||
contentCache = await caches.open(CACHE_NAME); | ||
for (var request of await tempCache.keys()) { | ||
var response = await tempCache.match(request); | ||
await contentCache.put(request, response); | ||
} | ||
await caches.delete(TEMP); | ||
// Save the manifest to make future upgrades efficient. | ||
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES))); | ||
return; | ||
} | ||
|
||
var oldManifest = await manifest.json(); | ||
var origin = self.location.origin; | ||
for (var request of await contentCache.keys()) { | ||
var key = request.url.substring(origin.length + 1); | ||
if (key == "") { | ||
key = "/"; | ||
} | ||
// If a resource from the old manifest is not in the new cache, or if | ||
// the MD5 sum has changed, delete it. Otherwise the resource is left | ||
// in the cache and can be reused by the new service worker. | ||
if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) { | ||
await contentCache.delete(request); | ||
} | ||
} | ||
// Populate the cache with the app shell TEMP files, potentially overwriting | ||
// cache files preserved above. | ||
for (var request of await tempCache.keys()) { | ||
var response = await tempCache.match(request); | ||
await contentCache.put(request, response); | ||
} | ||
await caches.delete(TEMP); | ||
// Save the manifest to make future upgrades efficient. | ||
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES))); | ||
return; | ||
} catch (err) { | ||
// On an unhandled exception the state of the cache cannot be guaranteed. | ||
console.error('Failed to upgrade service worker: ' + err); | ||
await caches.delete(CACHE_NAME); | ||
await caches.delete(TEMP); | ||
await caches.delete(MANIFEST); | ||
} | ||
}()); | ||
}); | ||
|
||
// The fetch handler redirects requests for RESOURCE files to the service | ||
// worker cache. | ||
self.addEventListener("fetch", (event) => { | ||
var origin = self.location.origin; | ||
var key = event.request.url.substring(origin.length + 1); | ||
// Redirect URLs to the index.html | ||
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) { | ||
key = '/'; | ||
} | ||
// If the URL is not the RESOURCE list, skip the cache. | ||
if (!RESOURCES[key]) { | ||
return event.respondWith(fetch(event.request)); | ||
} | ||
event.respondWith(caches.open(CACHE_NAME) | ||
.then((cache) => { | ||
return cache.match(event.request).then((response) => { | ||
// Either respond with the cached resource, or perform a fetch and | ||
// lazily populate the cache. Ensure the resources are not cached | ||
// by the browser for longer than the service worker expects. | ||
var modifiedRequest = new Request(event.request, {'cache': 'reload'}); | ||
return response || fetch(modifiedRequest).then((response) => { | ||
cache.put(event.request, response.clone()); | ||
return response; | ||
}); | ||
}) | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener('message', (event) => { | ||
// SkipWaiting can be used to immediately activate a waiting service worker. | ||
// This will also require a page refresh triggered by the main worker. | ||
if (event.data === 'skipWaiting') { | ||
return self.skipWaiting(); | ||
} | ||
|
||
if (event.message === 'downloadOffline') { | ||
downloadOffline(); | ||
} | ||
}); | ||
|
||
// Download offline will check the RESOURCES for all files not in the cache | ||
// and populate them. | ||
async function downloadOffline() { | ||
var resources = []; | ||
var contentCache = await caches.open(CACHE_NAME); | ||
var currentContent = {}; | ||
for (var request of await contentCache.keys()) { | ||
var key = request.url.substring(origin.length + 1); | ||
if (key == "") { | ||
key = "/"; | ||
} | ||
currentContent[key] = true; | ||
} | ||
for (var resourceKey in Object.keys(RESOURCES)) { | ||
if (!currentContent[resourceKey]) { | ||
resources.push(resourceKey); | ||
} | ||
} | ||
return contentCache.addAll(resources); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> | ||
<meta name="description" content="A new Flutter project."> | ||
|
||
<!-- 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="application"> | ||
<link rel="apple-touch-icon" href="icons/Icon-192.png"> | ||
|
||
<!-- Favicon --> | ||
<link rel="icon" type="image/png" href="favicon.png"/> | ||
|
||
<title>application</title> | ||
<link rel="manifest" href="manifest.json"> | ||
</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> | ||
if ('serviceWorker' in navigator) { | ||
window.addEventListener('load', function () { | ||
navigator.serviceWorker.register('flutter_service_worker.js'); | ||
}); | ||
} | ||
</script> | ||
<script src="main.dart.js" type="application/javascript"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.