Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!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
You can’t perform that action at this time.