Skip to content

Commit

Permalink
Merge pull request #41 from abdulmominsakib/master
Browse files Browse the repository at this point in the history
Added Loading Indicator on Web
  • Loading branch information
aslight0013 committed Feb 8, 2022
2 parents 0efc28d + 86cf823 commit 49104f5
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 11 deletions.
23 changes: 15 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,14 +21,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -143,14 +143,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -302,7 +309,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand All @@ -316,7 +323,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
win32:
dependency: transitive
description:
Expand All @@ -339,5 +346,5 @@ packages:
source: hosted
version: "5.1.1"
sdks:
dart: ">=2.13.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.24.0-7.0"
Binary file added web/assets/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 37 additions & 3 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<!--
If you are serving your web app in a path other than the root, change the
Expand All @@ -24,12 +25,33 @@
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<link rel="icon" type="image/png" href="favicon.png" />

<title>admin</title>
<link rel="manifest" href="manifest.json">
<!-- Styling for loading indicator -->
<style>
.container {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #212332;
}

.indicator {
width: 10vw;
}
</style>

</head>
<body>

<body style="overflow: hidden">
<!-- Loading Indicator -->
<div id="loading_container" class="container">
<img src="./assets/loading.gif" alt="loading indicator" class="indicator">
</div>
<!-- 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 -->
Expand All @@ -41,5 +63,17 @@
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
<!-- Removes the loading indicator after 10 seconds -->
<script>
window.onload = function () {
setTimeout(function () {
var loadingIndicator = document.getElementById("loading_container");
if (loadingIndicator) {
loadingIndicator.remove();
}
}, 10000)
}
</script>
</body>
</html>

</html>
2 changes: 2 additions & 0 deletions windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Generated file. Do not edit.
//

// clang-format off

#include "generated_plugin_registrant.h"


Expand Down
2 changes: 2 additions & 0 deletions windows/flutter/generated_plugin_registrant.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Generated file. Do not edit.
//

// clang-format off

#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_

Expand Down

0 comments on commit 49104f5

Please sign in to comment.