Created
January 21, 2020 07:51
-
-
Save edbond/2292661e635afb2614b3515aee54db6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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