Skip to content

Instantly share code, notes, and snippets.

@edbond
Created January 21, 2020 07:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save edbond/2292661e635afb2614b3515aee54db6b to your computer and use it in GitHub Desktop.
Save edbond/2292661e635afb2614b3515aee54db6b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>UI</title>
<style type="text/css">
#loader {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
#loader h1 {
color: black;
font-family: Arial, Helvetica, sans-serif;
font-size: 32px;
line-height: normal;
}
</style>
</head>
<body>
<div id="loader">
<h1>
Please wait... application is loading
</h1>
</div>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
import 'dart:html';
void main() {
print("sleeping...");
Future.delayed(Duration(seconds: 5), () {
print("done sleeping");
// remove loader
querySelector("#loader").remove();
// hide loader
runApp(MyApp());
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment