<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
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="$FLUTTER_BASE_HREF">
<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="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="consumer_app">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>consumer_app</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<script>
// Local previews must not keep serving an older Flutter bundle through a
// previously registered service worker. Production hosts keep their
// normal PWA policy; this recovery is deliberately limited to localhost.
//
// Important: load flutter_bootstrap only after the cleanup has completed.
// Loading both scripts in parallel races the unregister/cache deletion and
// can briefly paint an old, empty shell in a WebView.
(function () {
var isLocalPreview = /^(localhost|127\.0\.0\.1)$/.test(location.hostname);
var canUseServiceWorkers = 'serviceWorker' in navigator;
var canUseCaches = 'caches' in window;
// A browser can cache index.html itself before the cleanup script gets
// a chance to unregister an older Flutter worker. A one-time query
// parameter makes the local preview request the current index first;
// it is preserved for hash-based Flutter routes.
if (isLocalPreview && !/[?&]mw_refresh=/.test(location.search)) {
var refreshUrl = new URL(location.href);
refreshUrl.searchParams.set('mw_refresh', String(Date.now()));
location.replace(refreshUrl.toString());
return;
}
function loadFlutter() {
var script = document.createElement('script');
script.src = 'flutter_bootstrap.js';
script.async = true;
document.body.appendChild(script);
}
if (!isLocalPreview || !canUseServiceWorkers) {
loadFlutter();
return;
}
Promise.all([
navigator.serviceWorker.getRegistrations(),
canUseCaches ? caches.keys() : Promise.resolve([]),
]).then(function (result) {
var registrations = result[0];
var cacheKeys = result[1];
var hasStaleRuntime = registrations.length > 0 || cacheKeys.length > 0;
if (!hasStaleRuntime) {
loadFlutter();
return;
}
var unregister = Promise.all(registrations.map(function (registration) {
return registration.unregister();
}));
var clearCaches = canUseCaches
? Promise.all(cacheKeys.map(function (key) {
return caches.delete(key);
}))
: Promise.resolve([]);
return Promise.all([unregister, clearCaches]).then(function () {
location.reload();
});
}).catch(function () {
// A restricted WebView may expose the API but reject the cleanup.
// Starting Flutter is still preferable to leaving a blank document.
loadFlutter();
});
}());
</script>
<!-- MEINWEIMAR_GOOGLE_MAPS_SCRIPT -->
</body>
</html>
