Skip to content

Commit d3ac380

Browse files
committed
Update Splash Screen
1 parent 392b0c6 commit d3ac380

File tree

6 files changed

+116
-25
lines changed

6 files changed

+116
-25
lines changed

android/app/src/main/res/drawable/launch_background.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<item android:drawable="@android:color/white" />
55

66
<!-- You can insert your own image assets here -->
7-
<item>
7+
<!-- <item>
88
<bitmap
99
android:gravity="center"
1010
android:src="@mipmap/ic_launcher" />
11-
</item>
11+
</item> -->
1212
</layer-list>

lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'screens/home_screen.dart';
2+
import 'package:task_manager/screens/splash_screen.dart';
33

44
void main() {
55
runApp(MyApp());
@@ -15,7 +15,7 @@ class MyApp extends StatelessWidget {
1515
primarySwatch: Colors.red,
1616
visualDensity: VisualDensity.adaptivePlatformDensity,
1717
),
18-
home: HomeScreen(),
18+
home: Splash(),
1919
);
2020
}
2121
}

lib/screens/add_task_screen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ class _AddTaskScreenState extends State<AddTaskScreen> {
216216
color: Theme.of(context).primaryColor,
217217
borderRadius: BorderRadius.circular(30.0),
218218
),
219+
// ignore: deprecated_member_use
219220
child: FlatButton(
220221
child: Text(
221222
widget.task == null ? 'Add' : 'Update',
@@ -236,6 +237,7 @@ class _AddTaskScreenState extends State<AddTaskScreen> {
236237
color: Theme.of(context).primaryColor,
237238
borderRadius: BorderRadius.circular(30.0),
238239
),
240+
// ignore: deprecated_member_use
239241
child: FlatButton(
240242
child: Text(
241243
'Delete',

lib/screens/splash_screen.dart

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import 'dart:async';
2+
import 'dart:ui';
3+
4+
import 'package:flutter/cupertino.dart';
5+
import 'package:flutter/material.dart';
6+
7+
import 'home_screen.dart';
8+
9+
class Splash extends StatefulWidget {
10+
@override
11+
_SplashState createState() => _SplashState();
12+
}
13+
14+
class _SplashState extends State<Splash> {
15+
@override
16+
// ignore: must_call_super
17+
void initState() {
18+
super.initState();
19+
Timer(
20+
Duration(seconds: 2),
21+
() => Navigator.push(
22+
context, MaterialPageRoute(builder: (_) => HomeScreen())));
23+
}
24+
25+
Widget build(BuildContext context) {
26+
return Scaffold(
27+
body: Stack(
28+
fit: StackFit.expand,
29+
children: <Widget>[
30+
Container(
31+
decoration: BoxDecoration(color: Colors.white),
32+
child: Column(
33+
mainAxisAlignment: MainAxisAlignment.start,
34+
children: <Widget>[
35+
Expanded(
36+
flex: 2,
37+
child: Container(
38+
child: Column(
39+
mainAxisAlignment: MainAxisAlignment.center,
40+
children: <Widget>[
41+
CircleAvatar(
42+
backgroundColor: Color.fromRGBO(250, 250, 250, 1),
43+
radius: 40.0,
44+
child: Icon(
45+
Icons.check_rounded,
46+
color: Color(0xFF18D191),
47+
size: 60.0,
48+
),
49+
),
50+
Padding(
51+
padding: EdgeInsets.only(top: 20.0),
52+
),
53+
Text(
54+
"Task Manager",
55+
style: TextStyle(
56+
color: Colors.grey,
57+
fontSize: 20.0,
58+
),
59+
),
60+
],
61+
),
62+
),
63+
),
64+
Expanded(
65+
flex: 2,
66+
child: Column(
67+
mainAxisAlignment: MainAxisAlignment.end,
68+
children: <Widget>[
69+
//CircularProgressIndicator(backgroundColor: Colors.grey),
70+
Padding(padding: EdgeInsets.only(top: 20.0)),
71+
Text(
72+
"Bornomala Technologies",
73+
style: TextStyle(
74+
color: Colors.black54,
75+
fontSize: 17.0,
76+
),
77+
),
78+
Padding(padding: EdgeInsets.only(bottom: 60.0)),
79+
],
80+
),
81+
),
82+
],
83+
),
84+
),
85+
],
86+
),
87+
);
88+
}
89+
}

lib/screens/stacked_icons.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class StakedIcons extends StatelessWidget {
1515
child: new Icon(
1616
Icons.check_rounded,
1717
color: Color(0xFF18D191),
18-
size: 50,
18+
size: 50.0,
1919
),
2020
),
2121
],

pubspec.lock

Lines changed: 20 additions & 20 deletions
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
cupertino_icons:
4747
dependency: "direct main"
4848
description:
@@ -56,7 +56,7 @@ packages:
5656
name: fake_async
5757
url: "https://pub.dartlang.org"
5858
source: hosted
59-
version: "1.2.0-nullsafety.1"
59+
version: "1.2.0"
6060
ffi:
6161
dependency: transitive
6262
description:
@@ -94,21 +94,21 @@ packages:
9494
name: matcher
9595
url: "https://pub.dartlang.org"
9696
source: hosted
97-
version: "0.12.10-nullsafety.1"
97+
version: "0.12.10"
9898
meta:
9999
dependency: transitive
100100
description:
101101
name: meta
102102
url: "https://pub.dartlang.org"
103103
source: hosted
104-
version: "1.3.0-nullsafety.3"
104+
version: "1.3.0"
105105
path:
106106
dependency: transitive
107107
description:
108108
name: path
109109
url: "https://pub.dartlang.org"
110110
source: hosted
111-
version: "1.8.0-nullsafety.1"
111+
version: "1.8.0"
112112
path_provider:
113113
dependency: "direct main"
114114
description:
@@ -176,7 +176,7 @@ packages:
176176
name: source_span
177177
url: "https://pub.dartlang.org"
178178
source: hosted
179-
version: "1.8.0-nullsafety.2"
179+
version: "1.8.0"
180180
sqflite:
181181
dependency: "direct main"
182182
description:
@@ -197,21 +197,21 @@ packages:
197197
name: stack_trace
198198
url: "https://pub.dartlang.org"
199199
source: hosted
200-
version: "1.10.0-nullsafety.1"
200+
version: "1.10.0"
201201
stream_channel:
202202
dependency: transitive
203203
description:
204204
name: stream_channel
205205
url: "https://pub.dartlang.org"
206206
source: hosted
207-
version: "2.1.0-nullsafety.1"
207+
version: "2.1.0"
208208
string_scanner:
209209
dependency: transitive
210210
description:
211211
name: string_scanner
212212
url: "https://pub.dartlang.org"
213213
source: hosted
214-
version: "1.1.0-nullsafety.1"
214+
version: "1.1.0"
215215
synchronized:
216216
dependency: transitive
217217
description:
@@ -225,14 +225,14 @@ packages:
225225
name: term_glyph
226226
url: "https://pub.dartlang.org"
227227
source: hosted
228-
version: "1.2.0-nullsafety.1"
228+
version: "1.2.0"
229229
test_api:
230230
dependency: transitive
231231
description:
232232
name: test_api
233233
url: "https://pub.dartlang.org"
234234
source: hosted
235-
version: "0.2.19-nullsafety.2"
235+
version: "0.2.19"
236236
toast:
237237
dependency: "direct main"
238238
description:
@@ -246,14 +246,14 @@ packages:
246246
name: typed_data
247247
url: "https://pub.dartlang.org"
248248
source: hosted
249-
version: "1.3.0-nullsafety.3"
249+
version: "1.3.0"
250250
vector_math:
251251
dependency: transitive
252252
description:
253253
name: vector_math
254254
url: "https://pub.dartlang.org"
255255
source: hosted
256-
version: "2.1.0-nullsafety.3"
256+
version: "2.1.0"
257257
win32:
258258
dependency: transitive
259259
description:
@@ -269,5 +269,5 @@ packages:
269269
source: hosted
270270
version: "0.1.2"
271271
sdks:
272-
dart: ">=2.10.2 <2.11.0"
273-
flutter: ">=1.22.2 <2.0.0"
272+
dart: ">=2.12.0-0.0 <3.0.0"
273+
flutter: ">=1.22.2"

0 commit comments

Comments
 (0)