Skip to content

Commit

Permalink
Better be working now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashrit-Yarava committed Sep 4, 2020
1 parent 1addc75 commit b1a820f
Show file tree
Hide file tree
Showing 23 changed files with 64,445 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class UpdateTextState extends State {
],
),
Padding(
padding: EdgeInsets.fromLTRB(300.0, 10.0, 300.0, 10.0),
padding: EdgeInsets.fromLTRB(100.0, 10.0, 100.0, 10.0),
child: SelectableText(
"$textHolder",
textAlign: TextAlign.center,
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/web/.last_build_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96c4305e89b3ff525a1c1b6f5d143dbc
1 change: 1 addition & 0 deletions docs/web/assets/AssetManifest.json
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"]}
1 change: 1 addition & 0 deletions docs/web/assets/FontManifest.json
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"}]}]
14,772 changes: 14,772 additions & 0 deletions docs/web/assets/NOTICES

Large diffs are not rendered by default.

Binary file added docs/web/assets/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/web/assets/assets/strings/emojis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
😀😃😄😁😆😅🤣😂🙂🙃😉😊😇🥰😍🤩😘😗😚😙😋😛😜🤪😝🤑🤗🤭🤫🤔🤐🤨😐😑😶😏😒🙄😬🤥😌😔😪🤤😴😷🤒🤕🤢🤮🤧🥵🥶🥴😵🤯🤠🥳😎🤓🧐😕😟🙁😮😯😲😳🥺😦😧😨😰😥😢😭😱😖😣😞😓😩😫🥱😤😡😠🤬😈👿💀💩🤡👹👺👻👽👾🤖😺😸😹😻😼😽🙀😿😾💋👋🤚🖐✋🖖👌🤏🤞🤟🤘🤙👈👉👆🖕👇👍👎✊
Binary file added docs/web/assets/fonts/MaterialIcons-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file added docs/web/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
161 changes: 161 additions & 0 deletions docs/web/flutter_service_worker.js
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);
}
Binary file added docs/web/icons/Icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/web/icons/Icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions docs/web/index.html
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>
Loading

0 comments on commit b1a820f

Please sign in to comment.