Skip to content

Commit 6048775

Browse files
committed
Add web native splash screen
1 parent 44e6789 commit 6048775

File tree

4 files changed

+98
-21
lines changed

4 files changed

+98
-21
lines changed

pubspec.lock

+27-20
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0-nullsafety.1"
10+
version: "2.5.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.1.0-nullsafety.1"
17+
version: "2.1.0"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.1.0-nullsafety.3"
24+
version: "1.1.0"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0-nullsafety.1"
31+
version: "1.2.0"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.1.0-nullsafety.1"
38+
version: "1.1.0"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.15.0-nullsafety.3"
45+
version: "1.15.0"
4646
convert:
4747
dependency: transitive
4848
description:
@@ -70,7 +70,7 @@ packages:
7070
name: fake_async
7171
url: "https://pub.dartlang.org"
7272
source: hosted
73-
version: "1.2.0-nullsafety.1"
73+
version: "1.2.0"
7474
ffi:
7575
dependency: transitive
7676
description:
@@ -135,20 +135,27 @@ packages:
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137137
version: "0.16.1"
138+
js:
139+
dependency: transitive
140+
description:
141+
name: js
142+
url: "https://pub.dartlang.org"
143+
source: hosted
144+
version: "0.6.3"
138145
matcher:
139146
dependency: transitive
140147
description:
141148
name: matcher
142149
url: "https://pub.dartlang.org"
143150
source: hosted
144-
version: "0.12.10-nullsafety.1"
151+
version: "0.12.10"
145152
meta:
146153
dependency: transitive
147154
description:
148155
name: meta
149156
url: "https://pub.dartlang.org"
150157
source: hosted
151-
version: "1.3.0-nullsafety.3"
158+
version: "1.3.0"
152159
nested:
153160
dependency: transitive
154161
description:
@@ -162,7 +169,7 @@ packages:
162169
name: path
163170
url: "https://pub.dartlang.org"
164171
source: hosted
165-
version: "1.8.0-nullsafety.1"
172+
version: "1.8.0"
166173
path_provider:
167174
dependency: transitive
168175
description:
@@ -244,49 +251,49 @@ packages:
244251
name: source_span
245252
url: "https://pub.dartlang.org"
246253
source: hosted
247-
version: "1.8.0-nullsafety.2"
254+
version: "1.8.0"
248255
stack_trace:
249256
dependency: transitive
250257
description:
251258
name: stack_trace
252259
url: "https://pub.dartlang.org"
253260
source: hosted
254-
version: "1.10.0-nullsafety.1"
261+
version: "1.10.0"
255262
stream_channel:
256263
dependency: transitive
257264
description:
258265
name: stream_channel
259266
url: "https://pub.dartlang.org"
260267
source: hosted
261-
version: "2.1.0-nullsafety.1"
268+
version: "2.1.0"
262269
string_scanner:
263270
dependency: transitive
264271
description:
265272
name: string_scanner
266273
url: "https://pub.dartlang.org"
267274
source: hosted
268-
version: "1.1.0-nullsafety.1"
275+
version: "1.1.0"
269276
term_glyph:
270277
dependency: transitive
271278
description:
272279
name: term_glyph
273280
url: "https://pub.dartlang.org"
274281
source: hosted
275-
version: "1.2.0-nullsafety.1"
282+
version: "1.2.0"
276283
test_api:
277284
dependency: transitive
278285
description:
279286
name: test_api
280287
url: "https://pub.dartlang.org"
281288
source: hosted
282-
version: "0.2.19-nullsafety.2"
289+
version: "0.2.19"
283290
typed_data:
284291
dependency: transitive
285292
description:
286293
name: typed_data
287294
url: "https://pub.dartlang.org"
288295
source: hosted
289-
version: "1.3.0-nullsafety.3"
296+
version: "1.3.0"
290297
url_launcher:
291298
dependency: "direct main"
292299
description:
@@ -335,7 +342,7 @@ packages:
335342
name: vector_math
336343
url: "https://pub.dartlang.org"
337344
source: hosted
338-
version: "2.1.0-nullsafety.3"
345+
version: "2.1.0"
339346
very_good_analysis:
340347
dependency: "direct dev"
341348
description:
@@ -358,5 +365,5 @@ packages:
358365
source: hosted
359366
version: "0.1.2"
360367
sdks:
361-
dart: ">=2.10.0-110 <2.11.0"
362-
flutter: ">=1.22.0 <2.0.0"
368+
dart: ">=2.12.0-0.0 <3.0.0"
369+
flutter: ">=1.22.0"

web/icons/splash_animation.svg

+23
Loading

web/index.html

+13-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828

2929
<title>devs</title>
3030
<link rel="manifest" href="manifest.json">
31+
32+
<link rel="stylesheet" type="text/css" href="style.css">
3133
</head>
32-
<body>
34+
<body onload="document.body.style.opacity='1'">
3335
<!-- This script installs service_worker.js to provide PWA functionality to
3436
application. For more information, see:
3537
https://developers.google.com/web/fundamentals/primers/service-workers -->
@@ -41,5 +43,15 @@
4143
}
4244
</script>
4345
<script src="main.dart.js" type="application/javascript"></script>
46+
47+
<div class="Main-Container" >
48+
<div class="Fill-Width">
49+
<img src="./assets/assets/logos/logo.png" id="logo" />
50+
</div>
51+
<div class="Fill-Width">
52+
<img src="./icons/splash_animation.svg" id="splash" />
53+
</div>
54+
</div>
55+
4456
</body>
4557
</html>

web/style.css

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.Main-Container {
2+
margin: 0;
3+
position: absolute;
4+
top: 50%;
5+
left: 50%;
6+
margin-right: -50%;
7+
transform: translate(-50%, -50%)
8+
9+
}
10+
11+
.Fill-Width {
12+
width: 100%;
13+
margin-left: auto;
14+
margin-right: auto;
15+
text-align: center;
16+
}
17+
18+
#logo {
19+
width: 80vw;
20+
max-width: 500px;
21+
}
22+
23+
#splash {
24+
margin-top: 25px;
25+
width: 15vw;
26+
height: 15vw;
27+
max-width: 75px;
28+
max-height: 75px;
29+
}
30+
31+
body{
32+
opacity: 0;
33+
transition: opacity 1s;
34+
-webkit-transition: opacity 1s; /* Safari */
35+
}

0 commit comments

Comments
 (0)