dienianindya 2 år sedan
förälder
incheckning
fd6c322546

+ 1
- 0
assets/animation/animation_1.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
assets/animation/animation_2.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
assets/animation/animation_3.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Binär
assets/images/ic_administrator.png Visa fil


Binär
assets/images/ic_camera.png Visa fil


Binär
assets/images/ic_settings.png Visa fil


+ 6
- 15
lib/Screens/ForgotPassword/forgotPassword_screen.dart Visa fil

@@ -158,9 +158,12 @@ showAlertDialog(BuildContext context) {
158 158
   Widget okButton = TextButton(
159 159
     child: Text("OK"),
160 160
     onPressed: () {
161
-      Navigator.of(context).pop(true);
162
-      Navigator.of(context).pop(true);
163
-
161
+      Navigator.of(context, rootNavigator: true).pop();
162
+      Navigator.pushAndRemoveUntil(
163
+          context,
164
+          MaterialPageRoute(
165
+              builder: (context) => LoginView()),
166
+              (route) => false);
164 167
     },
165 168
   );
166 169
 
@@ -182,18 +185,6 @@ showAlertDialog(BuildContext context) {
182 185
   );
183 186
 }
184 187
 
185
-//Toast
186
-void _showToast(BuildContext context) {
187
-  final scaffold = ScaffoldMessenger.of(context);
188
-  scaffold.showSnackBar(
189
-    SnackBar(
190
-      content: const Text('Added to favorite'),
191
-      action: SnackBarAction(
192
-          label: 'UNDO', onPressed: scaffold.hideCurrentSnackBar),
193
-    ),
194
-  );
195
-}
196
-
197 188
 const List<Color> Gradients1 = [
198 189
   Color(0xFF0EDED2),
199 190
   Color(0xFF03A0FE),

+ 300
- 90
lib/Screens/Home/home_screen.dart Visa fil

@@ -1,6 +1,13 @@
1
+import 'package:double_back_to_close/double_back_to_close.dart';
1 2
 import 'package:flutter/material.dart';
2
-import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
3
-import 'package:hris_selfservice_mobile/Screens/Home/background.dart';
3
+import 'package:google_fonts/google_fonts.dart';
4
+import 'package:hris_selfservice_mobile/Screens/Menu/About/about_screen.dart';
5
+import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/absensi_screen.dart';
6
+import 'package:hris_selfservice_mobile/Screens/Menu/AjukanCuti/ajukancuti_screen.dart';
7
+import 'package:hris_selfservice_mobile/Screens/Menu/Berita/berita_screen.dart';
8
+import 'package:hris_selfservice_mobile/Screens/Menu/Lainnya/lainnya_screen.dart';
9
+import 'package:hris_selfservice_mobile/Screens/Menu/SlipGaji/slipgaji_screen.dart';
10
+import 'package:hris_selfservice_mobile/Screens/Settings/settings_screen.dart';
4 11
 
5 12
 class HomeView extends StatefulWidget {
6 13
   @override
@@ -10,15 +17,29 @@ class HomeView extends StatefulWidget {
10 17
 class _HomeView extends State<HomeView> {
11 18
   @override
12 19
   Widget build(BuildContext context) {
13
-    return Scaffold(
14
-        resizeToAvoidBottomInset: false,
15
-        //backgroundColor: Colors.white,
16
-        body: Stack(
17
-          children: <Widget>[
18
-            //Background(),
19
-            HomeScreen(),
20
-          ],
21
-        ));
20
+    return MaterialApp(
21
+      home: DoubleBack(
22
+        onFirstBackPress: (context) {
23
+          final snackBar = SnackBar(content: Text("Double Back Press to Exit"));
24
+          ScaffoldMessenger.of(context).showSnackBar(snackBar);
25
+        },
26
+        message: "Double Back Press to Exit",
27
+        background: Colors.black38,
28
+        backgroundRadius: 10,
29
+        textStyle: TextStyle(
30
+            fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white
31
+        ),
32
+        child: Scaffold(
33
+            resizeToAvoidBottomInset: false,
34
+            //backgroundColor: Colors.white,
35
+            body: Stack(
36
+              children: <Widget>[
37
+                //Background(),
38
+                HomeScreen(),
39
+              ],
40
+            )),
41
+      ),
42
+    );
22 43
   }
23 44
 }
24 45
 
@@ -27,91 +48,280 @@ class HomeScreen extends StatelessWidget {
27 48
 
28 49
   @override
29 50
   Widget build(BuildContext context) {
30
-    var size = MediaQuery.of(context).size;
51
+    var size = MediaQuery
52
+        .of(context)
53
+        .size;
31 54
     return Scaffold(
32
-      body: Stack(
33
-        children: <Widget>[
34
-          Container(
35
-            alignment: Alignment.topCenter,
36
-            margin: EdgeInsets.only(top: 15),
37
-            child: Card(
38
-              child: Container(
39
-                height: 200,
40
-                width: size.width - 20,
41
-                padding: EdgeInsets.all(15),
42
-                decoration: BoxDecoration(
43
-                    color: Colors.red,
44
-                    borderRadius: BorderRadius.all(Radius.circular(10))),
45
-              ),
46
-            ),
47
-          ),
48
-          GridView.count(
49
-            padding: EdgeInsets.all(5),
50
-            crossAxisCount: 2,
51
-            children: [
52
-              CustomCard(
53
-                  title: "Absensi",
54
-                  image: 'assets/icons/menu/ic_menu_absensi2.png'),
55
-              CustomCard(
56
-                  title: "Slip Gaji",
57
-                  image: 'assets/icons/menu/ic_menu_slipgaji2.png'),
58
-              CustomCard(
59
-                  title: "Ajukan Cuti",
60
-                  image: 'assets/icons/menu/ic_menu_ajukancuti2.png'),
61
-              CustomCard(
62
-                  title: "Berita",
63
-                  image: 'assets/icons/menu/ic_menu_berita2.png'),
64
-              CustomCard(
65
-                  title: "About",
66
-                  image: 'assets/icons/menu/ic_menu_about2.png'),
67
-              CustomCard(
68
-                  title: "Lainnya",
69
-                  image: 'assets/icons/menu/ic_menu_lainnya.png'),
70
-            ],
71
-          )
72
-        ],
73
-      ),
74
-    );
75
-  }
76
-}
77
-
78
-class CustomCard extends StatelessWidget {
79
-  CustomCard({required this.title, required this.image});
80
-
81
-  String title;
82
-  String image;
83
-
84
-  @override
85
-  Widget build(BuildContext context) {
86
-    return SizedBox(
87
-        height: 150,
88
-        width: 30,
89
-        child: Card(
90
-          margin: EdgeInsets.fromLTRB(20, 5, 20, 5),
91
-          color: Color(0xFFD9D9D9),
92
-          elevation: 5,
93
-          child: Column(
94
-            mainAxisAlignment: MainAxisAlignment.center,
95
-            crossAxisAlignment: CrossAxisAlignment.start,
96
-            children: [
55
+        body: SingleChildScrollView(
56
+          child: Stack(
57
+            children: <Widget>[
97 58
               Container(
98
-                height: 75,
59
+                height: size.height * 0.3,
99 60
                 decoration: BoxDecoration(
100
-                    image: DecorationImage(
101
-                        image: AssetImage(image),
102
-                        //fit: BoxFit.cover,
103
-                        alignment: Alignment.center)),
61
+                    gradient: LinearGradient(
62
+                        begin: Alignment.topRight,
63
+                        end: Alignment.bottomRight,
64
+                        colors: [
65
+                          Color(0xFFD21404),
66
+                          Color(0xFFFD7267),
67
+                        ])),
104 68
               ),
105
-              Container(
106
-                alignment: Alignment.bottomCenter,
107
-                padding: const EdgeInsets.all(15),
108
-                child: Text(
109
-                  title,
110
-                  textAlign: TextAlign.center,
69
+              SafeArea(
70
+                child: Padding(
71
+                  padding: EdgeInsets.all(20),
72
+                  child: Column(
73
+                    children: <Widget>[
74
+                      Align(
75
+                        alignment: Alignment.topRight,
76
+                        child: InkWell(
77
+                          child: Container(
78
+                              alignment: Alignment.center,
79
+                              height: 40,
80
+                              width: 40,
81
+                              child: Image.asset(
82
+                                  'assets/images/ic_settings.png')),
83
+                          onTap: () {
84
+                            Navigator.push(
85
+                                context,
86
+                                MaterialPageRoute(
87
+                                    builder: (context) =>
88
+                                        SettingsScreen()));
89
+                          },
90
+                        ),
91
+                      ),
92
+                      Stack(
93
+                        alignment: Alignment.topCenter,
94
+                        children: [
95
+                          Container(
96
+                            margin: EdgeInsets.only(top: ((size.width - 20) *
97
+                                0.3) * 0.5),
98
+                            child: Card(
99
+                              elevation: 15,
100
+                              child: Container(
101
+                                  height: size.width * 0.35,
102
+                                  width: size.width - 20,
103
+                                  padding: EdgeInsets.all(15),
104
+                                  decoration: BoxDecoration(
105
+                                      color: Colors.white,
106
+                                      borderRadius:
107
+                                      BorderRadius.all(Radius.circular(10))),
108
+                                  child: Column(
109
+                                    mainAxisAlignment: MainAxisAlignment.end,
110
+                                    crossAxisAlignment: CrossAxisAlignment
111
+                                        .center,
112
+                                    children: <Widget>[
113
+                                      Text(
114
+                                        'Dieni Anindyasarathi',
115
+                                        maxLines: 2,
116
+                                        overflow: TextOverflow.ellipsis,
117
+                                        textAlign: TextAlign.center,
118
+                                        style: GoogleFonts.inter(
119
+                                            fontSize: 17,
120
+                                            color: Colors.black,
121
+                                            fontWeight: FontWeight.bold),
122
+                                      ),
123
+                                      Text(
124
+                                        'IT Developer',
125
+                                        textAlign: TextAlign.center,
126
+                                        style: GoogleFonts.inter(
127
+                                            fontSize: 16, color: Colors.black),
128
+                                      ),
129
+                                    ],
130
+                                  )),
131
+                            ),
132
+                          ),
133
+                          Container(
134
+                            alignment: Alignment.topCenter,
135
+                            height: (size.width - 20) * 0.3,
136
+                            width: (size.width - 20) * 0.3,
137
+                            decoration: BoxDecoration(
138
+                              color: Colors.black,
139
+                              image: DecorationImage(
140
+                                image: AssetImage(
141
+                                    'assets/images/ic_administrator.png'),
142
+                                fit: BoxFit.fill,
143
+                              ),
144
+                              shape: BoxShape.circle,
145
+                            ),
146
+                          ),
147
+                        ],
148
+                      ),
149
+                      GridView.count(
150
+                        shrinkWrap: true,
151
+                        physics: NeverScrollableScrollPhysics(),
152
+                        padding: EdgeInsets.only(top: 25, left: 5, right: 5),
153
+                        crossAxisSpacing: 15,
154
+                        mainAxisSpacing: 15,
155
+                        crossAxisCount: 2,
156
+                        children: <Widget>[
157
+                          InkWell(
158
+                            child: Container(
159
+                              decoration: BoxDecoration(
160
+                                  color: Color(0xFFD9D9D9),
161
+                                  borderRadius: BorderRadius.circular(5)),
162
+                              child: Column(
163
+                                crossAxisAlignment: CrossAxisAlignment.center,
164
+                                mainAxisAlignment: MainAxisAlignment.center,
165
+                                children: <Widget>[
166
+                                  Image.asset(
167
+                                    "assets/icons/menu/ic_menu_absensi2.png",
168
+                                    width: 75,
169
+                                    height: 75,
170
+                                  ),
171
+                                  Text(
172
+                                    'Absensi',
173
+                                    textAlign: TextAlign.center,
174
+                                    style: GoogleFonts.acme(
175
+                                        fontSize: 18, color: Colors.black),
176
+                                  )
177
+                                ],
178
+                              ),
179
+                            ),
180
+                            onTap:(){
181
+                              Navigator.push(context, MaterialPageRoute(
182
+                                  builder: (context) => AbsensiScreen()));
183
+                            }
184
+                          ),
185
+                          InkWell(
186
+                            child: Container(
187
+                              decoration: BoxDecoration(
188
+                                  color: Color(0xFFD9D9D9),
189
+                                  borderRadius: BorderRadius.circular(5)),
190
+                              child: Column(
191
+                                crossAxisAlignment: CrossAxisAlignment.center,
192
+                                mainAxisAlignment: MainAxisAlignment.center,
193
+                                children: <Widget>[
194
+                                  Image.asset(
195
+                                      "assets/icons/menu/ic_menu_slipgaji2.png",
196
+                                      height: 75,
197
+                                      width: 75),
198
+                                  Text(
199
+                                    'Slip Gaji',
200
+                                    textAlign: TextAlign.center,
201
+                                    style: GoogleFonts.acme(
202
+                                        fontSize: 18, color: Colors.black),
203
+                                  )
204
+                                ],
205
+                              ),
206
+                            ),
207
+                            onTap: (){
208
+                              Navigator.push(context, MaterialPageRoute(
209
+                                  builder: (context) => SlipGajiScreen()));
210
+                            },
211
+                          ),
212
+                          InkWell(
213
+                            child: Container(
214
+                              decoration: BoxDecoration(
215
+                                  color: Color(0xFFD9D9D9),
216
+                                  borderRadius: BorderRadius.circular(5)),
217
+                              child: Column(
218
+                                crossAxisAlignment: CrossAxisAlignment.center,
219
+                                mainAxisAlignment: MainAxisAlignment.center,
220
+                                children: <Widget>[
221
+                                  Image.asset(
222
+                                      "assets/icons/menu/ic_menu_ajukancuti2.png",
223
+                                      height: 75,
224
+                                      width: 75),
225
+                                  Text(
226
+                                    'Ajukan Cuti',
227
+                                    textAlign: TextAlign.center,
228
+                                    style: GoogleFonts.acme(
229
+                                        fontSize: 18, color: Colors.black),
230
+                                  )
231
+                                ],
232
+                              ),
233
+                            ),
234
+                            onTap: (){
235
+                              Navigator.push(context, MaterialPageRoute(
236
+                                  builder: (context) => AjukanCutiScreen()));
237
+                            },
238
+                          ),
239
+                          InkWell(
240
+                            child: Container(
241
+                              decoration: BoxDecoration(
242
+                                  color: Color(0xFFD9D9D9),
243
+                                  borderRadius: BorderRadius.circular(5)),
244
+                              child: Column(
245
+                                crossAxisAlignment: CrossAxisAlignment.center,
246
+                                mainAxisAlignment: MainAxisAlignment.center,
247
+                                children: <Widget>[
248
+                                  Image.asset(
249
+                                      "assets/icons/menu/ic_menu_berita2.png",
250
+                                      height: 75, width: 75),
251
+                                  Text(
252
+                                    'Berita',
253
+                                    textAlign: TextAlign.center,
254
+                                    style: GoogleFonts.acme(
255
+                                        fontSize: 18, color: Colors.black),
256
+                                  )
257
+                                ],
258
+                              ),
259
+                            ),
260
+                            onTap: (){
261
+                              Navigator.push(context, MaterialPageRoute(
262
+                                  builder: (context) => BeritaScreen()));
263
+                            },
264
+                          ),
265
+                          InkWell(
266
+                            child: Container(
267
+                              decoration: BoxDecoration(
268
+                                  color: Color(0xFFD9D9D9),
269
+                                  borderRadius: BorderRadius.circular(5)),
270
+                              child: Column(
271
+                                crossAxisAlignment: CrossAxisAlignment.center,
272
+                                mainAxisAlignment: MainAxisAlignment.center,
273
+                                children: <Widget>[
274
+                                  Image.asset(
275
+                                      "assets/icons/menu/ic_menu_about2.png",
276
+                                      height: 75, width: 75),
277
+                                  Text(
278
+                                    'About',
279
+                                    textAlign: TextAlign.center,
280
+                                    style: GoogleFonts.acme(
281
+                                        fontSize: 18, color: Colors.black),
282
+                                  )
283
+                                ],
284
+                              ),
285
+                            ),
286
+                            onTap: (){
287
+                              Navigator.push(context, MaterialPageRoute(
288
+                                  builder: (context) => AboutScreen()));
289
+                            },
290
+                          ),
291
+                          InkWell(
292
+                            child: Container(
293
+                              decoration: BoxDecoration(
294
+                                  color: Color(0xFFD9D9D9),
295
+                                  borderRadius: BorderRadius.circular(5)),
296
+                              child: Column(
297
+                                crossAxisAlignment: CrossAxisAlignment.center,
298
+                                mainAxisAlignment: MainAxisAlignment.center,
299
+                                children: <Widget>[
300
+                                  Image.asset(
301
+                                      "assets/icons/menu/ic_menu_lainnya.png",
302
+                                      height: 75, width: 75),
303
+                                  Text(
304
+                                    'Lainnya',
305
+                                    textAlign: TextAlign.center,
306
+                                    style: GoogleFonts.acme(
307
+                                        fontSize: 18, color: Colors.black),
308
+                                  )
309
+                                ],
310
+                              ),
311
+                            ),
312
+                            onTap: (){
313
+                              Navigator.push(context, MaterialPageRoute(
314
+                                  builder: (context) => LainnyaScreen()));
315
+                            },
316
+                          ),
317
+                        ],
318
+                      )
319
+                    ],
320
+                  ),
111 321
                 ),
112
-              )
322
+              ),
113 323
             ],
114 324
           ),
115 325
         ));
116 326
   }
117
-}
327
+}

+ 0
- 43
lib/Screens/Home/inputWidget.dart Visa fil

@@ -1,43 +0,0 @@
1
-import 'package:flutter/material.dart';
2
-
3
-class InputWidgetProfile extends StatelessWidget {
4
-  final double topRight;
5
-  final double bottomRight;
6
-  final double topLeft;
7
-  final double bottomLeft;
8
-
9
-  InputWidgetProfile(this.topRight, this.bottomRight, this.topLeft, this.bottomLeft);
10
-
11
-  @override
12
-  Widget build(BuildContext context) {
13
-    return Padding(
14
-      padding: EdgeInsets.only(right: 20, left: 20, bottom: 20),
15
-      child: Container(
16
-        width: MediaQuery.of(context).size.width - 20,
17
-        child: Material(
18
-          elevation: 10,
19
-          color: Colors.red,
20
-          shape: RoundedRectangleBorder(
21
-              borderRadius: BorderRadius.circular(20)),
22
-          child: Padding(
23
-            padding: EdgeInsets.only(left: 25, right: 20, top: 10, bottom: 10),
24
-            child: TextFormField(
25
-              keyboardType: TextInputType.emailAddress,
26
-              textInputAction: TextInputAction.next,
27
-              decoration: InputDecoration(
28
-                  border: InputBorder.none,
29
-                  prefixIcon: Icon(Icons.person),
30
-                  prefixIconConstraints: BoxConstraints(
31
-                    minWidth: 40,
32
-                    minHeight: 40,
33
-                  ),
34
-                  hintText: "hris_selfservice@example.com",
35
-                  hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
36
-            ),
37
-          ),
38
-        ),
39
-      ),
40
-    );
41
-  }
42
-}
43
-

+ 7
- 4
lib/Screens/Login/background.dart Visa fil

@@ -41,14 +41,17 @@ class Background extends StatelessWidget {
41 41
 }
42 42
 
43 43
 const List<Color> orangeGradients = [
44
-  Color(0xFFFF9844),
44
+  /*Color(0xFFFF9844),
45 45
   Color(0xFFFE8853),
46
-  Color(0xFFFD7267),
46
+  Color(0xFFFD7267),*/
47
+  Color(0xFFD21404),
48
+  Color(0xFFFD7267)
47 49
 ];
48 50
 
49 51
 const List<Color> aquaGradients = [
50
-  Color(0xFF5AEAF1),
51 52
   Color(0xFF8EF7DA),
53
+  Color(0xFF5AEAF1),
54
+  Colors.blueAccent,
52 55
 ];
53 56
 
54 57
 class WavyHeader extends StatelessWidget {
@@ -93,7 +96,7 @@ class CirclePink extends StatelessWidget {
93 96
     return Transform.translate(
94 97
       offset: Offset(-70.0, 90.0),
95 98
       child: Material(
96
-        color: Colors.pink,
99
+        color: Color(0xFFFF9844),
97 100
         child: Padding(padding: EdgeInsets.all(120)),
98 101
         shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
99 102
       ),

+ 11
- 0
lib/Screens/Login/inputWidget.dart Visa fil

@@ -22,6 +22,7 @@ class InputWidgetEmail extends StatelessWidget {
22 22
           child: Padding(
23 23
             padding: EdgeInsets.only(left: 25, right: 20, top: 10, bottom: 10),
24 24
             child: TextFormField(
25
+              controller: emailController,
25 26
               keyboardType: TextInputType.emailAddress,
26 27
               textInputAction: TextInputAction.next,
27 28
               decoration: InputDecoration(
@@ -63,6 +64,7 @@ class InputWidgetPassword extends StatelessWidget {
63 64
           child: Padding(
64 65
             padding: EdgeInsets.only(left: 25, right: 20, top: 10, bottom: 10),
65 66
             child: TextFormField(
67
+              controller: passwordController,
66 68
               textInputAction: TextInputAction.done,
67 69
               obscureText: true,
68 70
               decoration: InputDecoration(
@@ -74,6 +76,12 @@ class InputWidgetPassword extends StatelessWidget {
74 76
                   ),
75 77
                   hintText: "Password",
76 78
                   hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
79
+              validator: (text){
80
+                if (text!.contains('@') && text.isNotEmpty){
81
+                  return "Enter a valid email address!";
82
+                }
83
+                return null;
84
+              },
77 85
             ),
78 86
           ),
79 87
         ),
@@ -81,3 +89,6 @@ class InputWidgetPassword extends StatelessWidget {
81 89
     );
82 90
   }
83 91
 }
92
+
93
+TextEditingController emailController = TextEditingController();
94
+TextEditingController passwordController = TextEditingController();

+ 99
- 96
lib/Screens/Login/login_screen.dart Visa fil

@@ -30,108 +30,110 @@ class LoginScreen extends StatelessWidget {
30 30
 
31 31
   @override
32 32
   Widget build(BuildContext context) {
33
-    return Column(
34
-      children: <Widget>[
35
-        Padding(
36
-          padding:
37
-              EdgeInsets.only(top: MediaQuery.of(context).size.height / 2.45),
38
-        ),
39
-        Column(
40
-          children: <Widget>[
41
-            Column(
42
-              crossAxisAlignment: CrossAxisAlignment.center,
43
-              children: <Widget>[
44
-                Padding(
45
-                  padding: EdgeInsets.only(top: 0),
46
-                  child: Text(
47
-                    "Login",
48
-                    style: GoogleFonts.knewave(
49
-                        color: Colors.blueAccent, fontSize: 25),
33
+    return SingleChildScrollView(
34
+      child: Column(
35
+        children: <Widget>[
36
+          Padding(
37
+            padding:
38
+            EdgeInsets.only(top: MediaQuery.of(context).size.height / 2.45),
39
+          ),
40
+          Column(
41
+            children: <Widget>[
42
+              Column(
43
+                crossAxisAlignment: CrossAxisAlignment.center,
44
+                children: <Widget>[
45
+                  Padding(
46
+                    padding: EdgeInsets.only(top: 0),
47
+                    child: Text(
48
+                      "Login",
49
+                      style: GoogleFonts.knewave(
50
+                          color: Colors.blueAccent, fontSize: 25),
51
+                    ),
50 52
                   ),
51
-                ),
52
-              ],
53
-            ),
54
-            Column(
55
-              crossAxisAlignment: CrossAxisAlignment.start,
56
-              children: <Widget>[
57
-                Padding(
58
-                  padding: EdgeInsets.only(left: 40, bottom: 5, top: 20),
59
-                  child: Text(
60
-                    "Email",
61
-                    style: TextStyle(fontSize: 16, color: Colors.black87),
53
+                ],
54
+              ),
55
+              Column(
56
+                crossAxisAlignment: CrossAxisAlignment.start,
57
+                children: <Widget>[
58
+                  Padding(
59
+                    padding: EdgeInsets.only(left: 40, bottom: 5, top: 20),
60
+                    child: Text(
61
+                      "Email",
62
+                      style: TextStyle(fontSize: 16, color: Colors.black87),
63
+                    ),
64
+                  ),
65
+                  Stack(
66
+                    alignment: Alignment.bottomRight,
67
+                    children: <Widget>[
68
+                      InputWidgetEmail(20.0, 20.0),
69
+                      Padding(
70
+                        padding: EdgeInsets.only(right: 50),
71
+                      ),
72
+                    ],
62 73
                   ),
63
-                ),
64
-                Stack(
65
-                  alignment: Alignment.bottomRight,
66
-                  children: <Widget>[
67
-                    InputWidgetEmail(20.0, 20.0),
68
-                    Padding(
69
-                      padding: EdgeInsets.only(right: 50),
74
+                ],
75
+              ),
76
+              Column(
77
+                crossAxisAlignment: CrossAxisAlignment.start,
78
+                children: <Widget>[
79
+                  Padding(
80
+                    padding: EdgeInsets.only(left: 40, bottom: 5),
81
+                    child: Text(
82
+                      "Password",
83
+                      style: TextStyle(fontSize: 16, color: Colors.black87),
70 84
                     ),
71
-                  ],
72
-                ),
73
-              ],
74
-            ),
75
-            Column(
76
-              crossAxisAlignment: CrossAxisAlignment.start,
77
-              children: <Widget>[
78
-                Padding(
79
-                  padding: EdgeInsets.only(left: 40, bottom: 5),
80
-                  child: Text(
81
-                    "Password",
82
-                    style: TextStyle(fontSize: 16, color: Colors.black87),
83 85
                   ),
84
-                ),
85
-                Stack(
86
-                  alignment: Alignment.bottomRight,
87
-                  children: <Widget>[
88
-                    InputWidgetPassword(20.0, 20.0),
89
-                    Padding(
90
-                      padding: EdgeInsets.only(right: 15),
91
-                      child: Row(
92
-                        children: <Widget>[
93
-                          Expanded(
94
-                              child: Padding(
95
-                            padding: EdgeInsets.only(top: 0),
96
-                          )),
97
-                          InkWell(
98
-                            child: Container(
99
-                              padding: EdgeInsets.all(10),
100
-                              decoration: ShapeDecoration(
101
-                                shape: CircleBorder(),
102
-                                gradient: LinearGradient(
103
-                                    colors: Gradients2,
104
-                                    begin: Alignment.topLeft,
105
-                                    end: Alignment.bottomRight),
86
+                  Stack(
87
+                    alignment: Alignment.bottomRight,
88
+                    children: <Widget>[
89
+                      InputWidgetPassword(20.0, 20.0),
90
+                      Padding(
91
+                        padding: EdgeInsets.only(right: 15),
92
+                        child: Row(
93
+                          children: <Widget>[
94
+                            Expanded(
95
+                                child: Padding(
96
+                                  padding: EdgeInsets.only(top: 0),
97
+                                )),
98
+                            InkWell(
99
+                              child: Container(
100
+                                padding: EdgeInsets.all(10),
101
+                                decoration: ShapeDecoration(
102
+                                  shape: CircleBorder(),
103
+                                  gradient: LinearGradient(
104
+                                      colors: Gradients2,
105
+                                      begin: Alignment.topLeft,
106
+                                      end: Alignment.bottomRight),
107
+                                ),
108
+                                child: ImageIcon(
109
+                                  AssetImage("assets/images/ic_forward.png"),
110
+                                  size: 40,
111
+                                  color: Colors.white,
112
+                                ),
106 113
                               ),
107
-                              child: ImageIcon(
108
-                                AssetImage("assets/images/ic_forward.png"),
109
-                                size: 40,
110
-                                color: Colors.white,
111
-                              ),
112
-                            ),
113
-                            onTap: () {
114
-                              Navigator.push(context, MaterialPageRoute(builder: (context) => HomeView()));
115
-                            },
116
-                          )
117
-                        ],
114
+                              onTap: () {
115
+                                Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => HomeView()));
116
+                              },
117
+                            )
118
+                          ],
119
+                        ),
118 120
                       ),
119
-                    ),
120
-                  ],
121
-                ),
122
-              ],
123
-            ),
124
-            Padding(
125
-              padding: EdgeInsets.only(bottom: 10),
126
-            ),
127
-            InkWell(
128
-                child: roundedRectButton("Forgot Password?", Gradients1, false),
129
-                onTap: () {
130
-                  Navigator.push(context, MaterialPageRoute(builder: (context) => ForgotPasswordView()));
131
-                })
132
-          ],
133
-        )
134
-      ],
121
+                    ],
122
+                  ),
123
+                ],
124
+              ),
125
+              Padding(
126
+                padding: EdgeInsets.only(bottom: 10),
127
+              ),
128
+              InkWell(
129
+                  child: roundedRectButton("Forgot Password?", Gradients1, false),
130
+                  onTap: () {
131
+                    Navigator.push(context, MaterialPageRoute(builder: (context) => ForgotPasswordView()));
132
+                  })
133
+            ],
134
+          )
135
+        ],
136
+      ),
135 137
     );
136 138
   }
137 139
 }
@@ -182,6 +184,7 @@ Widget roundedRectButton(
182 184
 const List<Color> Gradients1 = [
183 185
   Color(0xFF0EDED2),
184 186
   Color(0xFF03A0FE),
187
+  Colors.pink,
185 188
 ];
186 189
 
187 190
 const List<Color> Gradients2 = [

+ 10
- 0
lib/Screens/Menu/About/about_screen.dart Visa fil

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class AboutScreen extends StatelessWidget {
4
+  const AboutScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Container();
9
+  }
10
+}

+ 14
- 0
lib/Screens/Menu/Absensi/absensi_screen.dart Visa fil

@@ -0,0 +1,14 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class AbsensiScreen extends StatelessWidget {
4
+  const AbsensiScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Scaffold(
9
+      body: SingleChildScrollView(
10
+
11
+      ),
12
+    );
13
+  }
14
+}

+ 10
- 0
lib/Screens/Menu/AjukanCuti/ajukancuti_screen.dart Visa fil

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class AjukanCutiScreen extends StatelessWidget {
4
+  const AjukanCutiScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Container();
9
+  }
10
+}

+ 10
- 0
lib/Screens/Menu/Berita/berita_screen.dart Visa fil

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class BeritaScreen extends StatelessWidget {
4
+  const BeritaScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Container();
9
+  }
10
+}

+ 10
- 0
lib/Screens/Menu/Lainnya/lainnya_screen.dart Visa fil

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class LainnyaScreen extends StatelessWidget {
4
+  const LainnyaScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Container();
9
+  }
10
+}

+ 10
- 0
lib/Screens/Menu/SlipGaji/slipgaji_screen.dart Visa fil

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class SlipGajiScreen extends StatelessWidget {
4
+  const SlipGajiScreen({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Container();
9
+  }
10
+}

+ 34
- 0
lib/Screens/Settings/inputWidget.dart Visa fil

@@ -0,0 +1,34 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class InputWidgetPassword extends StatelessWidget {
4
+  final String hintText;
5
+
6
+  InputWidgetPassword(this.hintText);
7
+
8
+  @override
9
+  Widget build(BuildContext context) {
10
+    return Padding(
11
+      padding: EdgeInsets.only(bottom: 15),
12
+      child: Container(
13
+        width: MediaQuery.of(context).size.width,
14
+        child: Material(
15
+          elevation: 10,
16
+          color: Colors.white,
17
+          shape: RoundedRectangleBorder(
18
+              borderRadius: BorderRadius.all(Radius.circular(10))),
19
+          child: Padding(
20
+            padding: EdgeInsets.only(left: 5, right: 5),
21
+            child: TextFormField(
22
+              textInputAction: TextInputAction.done,
23
+              obscureText: true,
24
+              decoration: InputDecoration(
25
+                  border: InputBorder.none,
26
+                  hintText: hintText,
27
+                  hintStyle: TextStyle(color: Color(0xFFE1E1E1), fontSize: 16)),
28
+            ),
29
+          ),
30
+        ),
31
+      ),
32
+    );
33
+  }
34
+}

+ 289
- 0
lib/Screens/Settings/settings_screen.dart Visa fil

@@ -0,0 +1,289 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:google_fonts/google_fonts.dart';
3
+import '../Login/login_screen.dart';
4
+import '../Settings/inputWidget.dart';
5
+
6
+class SettingsScreen extends StatefulWidget {
7
+  const SettingsScreen({Key? key}) : super(key: key);
8
+
9
+  @override
10
+  State<SettingsScreen> createState() => _SettingsScreenState();
11
+}
12
+
13
+class _SettingsScreenState extends State<SettingsScreen> {
14
+  bool visible = false;
15
+
16
+  @override
17
+  Widget build(BuildContext context) {
18
+    var size = MediaQuery.of(context).size;
19
+    return Scaffold(
20
+        body: SingleChildScrollView(
21
+      child: Stack(
22
+        children: <Widget>[
23
+          Container(
24
+            height: size.height * 0.3,
25
+            decoration: BoxDecoration(
26
+                gradient: LinearGradient(
27
+                    begin: Alignment.topRight,
28
+                    end: Alignment.bottomRight,
29
+                    colors: [
30
+                  Color(0xFFD21404),
31
+                  Color(0xFFFD7267),
32
+                ])),
33
+          ),
34
+          SafeArea(
35
+            child: Padding(
36
+              padding: EdgeInsets.all(20),
37
+              child: Column(
38
+                children: <Widget>[
39
+                  Stack(
40
+                    alignment: Alignment.topCenter,
41
+                    children: [
42
+                      Container(
43
+                        margin: EdgeInsets.only(
44
+                            top: (((size.width - 20) * 0.33) * 0.5)),
45
+                        child: Card(
46
+                          elevation: 15,
47
+                          child: Container(
48
+                              height: (size.height * 0.28) * .7,
49
+                              width: size.width - 20,
50
+                              padding: EdgeInsets.all(15),
51
+                              decoration: BoxDecoration(
52
+                                  color: Colors.white,
53
+                                  borderRadius:
54
+                                      BorderRadius.all(Radius.circular(10))),
55
+                              child: Column(
56
+                                mainAxisAlignment: MainAxisAlignment.end,
57
+                                crossAxisAlignment: CrossAxisAlignment.center,
58
+                                children: <Widget>[
59
+                                  Text(
60
+                                    'Dieni Anindyasarathi',
61
+                                    maxLines: 2,
62
+                                    overflow: TextOverflow.ellipsis,
63
+                                    textAlign: TextAlign.center,
64
+                                    style: GoogleFonts.inter(
65
+                                        fontSize: 17,
66
+                                        color: Colors.black,
67
+                                        fontWeight: FontWeight.bold),
68
+                                  ),
69
+                                  Text(
70
+                                    'IT Developer',
71
+                                    textAlign: TextAlign.center,
72
+                                    style: GoogleFonts.inter(
73
+                                        fontSize: 16, color: Colors.black),
74
+                                  ),
75
+                                ],
76
+                              )),
77
+                        ),
78
+                      ),
79
+                      Container(
80
+                          height: (size.width - 20) * 0.33,
81
+                          width: (size.width - 20) * 0.33,
82
+                          decoration: BoxDecoration(
83
+                            color: Colors.black,
84
+                            image: DecorationImage(
85
+                              image: AssetImage(
86
+                                  'assets/images/ic_administrator.png'),
87
+                              fit: BoxFit.fill,
88
+                            ),
89
+                            shape: BoxShape.circle,
90
+                          ),
91
+                          ),
92
+                      Container(
93
+                        height: ((size.width - 20) * 0.33) * 0.25,
94
+                        width: ((size.width - 20) * 0.33) * 0.25,
95
+                        margin: EdgeInsets.only(
96
+                            top: (((size.width - 20) * 0.33) - 20),
97
+                            left: ((size.width - 20) * 0.33) - 10),
98
+                        decoration: BoxDecoration(
99
+                          color: Colors.yellow,
100
+                          image: DecorationImage(
101
+                            image: AssetImage('assets/images/ic_camera.png'),
102
+                            fit: BoxFit.scaleDown,
103
+                          ),
104
+                          shape: BoxShape.circle,
105
+                        ),
106
+                      ),
107
+                    ],
108
+                  ),
109
+                  InkWell(
110
+                    child:
111
+                        roundedRectButton("Edit Password", Gradients1, 20, 5),
112
+                    onTap: () {
113
+                      setState(() {
114
+                        visible = !visible;
115
+                      });
116
+                    },
117
+                  ),
118
+                  Visibility(
119
+                    visible: visible,
120
+                    child: Container(
121
+                      margin: EdgeInsets.only(top: 10),
122
+                      width: size.width - 50,
123
+                      padding: EdgeInsets.all(15),
124
+                      decoration: BoxDecoration(
125
+                          color: Color(0xFFD9D9D9),
126
+                          borderRadius: BorderRadius.all(Radius.circular(5))),
127
+                      child: Column(
128
+                        children: [
129
+                          Column(
130
+                            crossAxisAlignment: CrossAxisAlignment.start,
131
+                            children: <Widget>[
132
+                              Padding(
133
+                                padding: EdgeInsets.only(bottom: 5),
134
+                                child: Text(
135
+                                  "Type your current Password",
136
+                                  style: TextStyle(
137
+                                      fontSize: 16, color: Colors.black87),
138
+                                ),
139
+                              ),
140
+                              Stack(
141
+                                alignment: Alignment.bottomRight,
142
+                                children: <Widget>[
143
+                                  InputWidgetPassword("Current Password"),
144
+                                ],
145
+                              ),
146
+                            ],
147
+                          ),
148
+                          Column(
149
+                            crossAxisAlignment: CrossAxisAlignment.start,
150
+                            children: <Widget>[
151
+                              Padding(
152
+                                padding: EdgeInsets.only(bottom: 5),
153
+                                child: Text(
154
+                                  "Type your New Password",
155
+                                  style: TextStyle(
156
+                                      fontSize: 16, color: Colors.black87),
157
+                                ),
158
+                              ),
159
+                              Stack(
160
+                                alignment: Alignment.bottomRight,
161
+                                children: <Widget>[
162
+                                  InputWidgetPassword("New Password"),
163
+                                ],
164
+                              ),
165
+                            ],
166
+                          ),
167
+                          Column(
168
+                            crossAxisAlignment: CrossAxisAlignment.start,
169
+                            children: <Widget>[
170
+                              Padding(
171
+                                padding: EdgeInsets.only(bottom: 5),
172
+                                child: Text(
173
+                                  "Re-type your New Password",
174
+                                  style: TextStyle(
175
+                                      fontSize: 16, color: Colors.black87),
176
+                                ),
177
+                              ),
178
+                              Stack(
179
+                                alignment: Alignment.bottomRight,
180
+                                children: <Widget>[
181
+                                  InputWidgetPassword("Re-type New Password"),
182
+                                ],
183
+                              ),
184
+                            ],
185
+                          ),
186
+                          InkWell(
187
+                              child: roundedRectButton(
188
+                                  "Save Password", Gradients2, 10, 10),
189
+                              onTap: () {
190
+                                showAlertDialog(context);
191
+                              }),
192
+                        ],
193
+                      ),
194
+                    ),
195
+                  ),
196
+                  InkWell(
197
+                      child: roundedRectButton("Logout", Gradients1, 10, 5),
198
+                      onTap: () {
199
+                        showAlertDialog(context);
200
+                      }),
201
+                ],
202
+              ),
203
+            ),
204
+          ),
205
+        ],
206
+      ),
207
+    ));
208
+  }
209
+}
210
+
211
+Widget roundedRectButton(String title, List<Color> gradient, double marginTop,
212
+    double radiusCircular) {
213
+  return Builder(builder: (BuildContext mContext) {
214
+    return Align(
215
+      alignment: Alignment.center,
216
+      child: Stack(
217
+        children: <Widget>[
218
+          Container(
219
+            margin: EdgeInsets.only(top: marginTop),
220
+            alignment: Alignment.center,
221
+            height: 55,
222
+            width: MediaQuery.of(mContext).size.width - 50,
223
+            decoration: ShapeDecoration(
224
+              shape: RoundedRectangleBorder(
225
+                  borderRadius:
226
+                      BorderRadius.all(Radius.circular(radiusCircular))),
227
+              gradient: LinearGradient(
228
+                  colors: gradient,
229
+                  begin: Alignment.topLeft,
230
+                  end: Alignment.bottomRight),
231
+            ),
232
+            child: Text(title,
233
+                style: TextStyle(
234
+                    color: Colors.white,
235
+                    fontSize: 19,
236
+                    fontWeight: FontWeight.w500)),
237
+            padding: EdgeInsets.all(10),
238
+          )
239
+        ],
240
+      ),
241
+    );
242
+  });
243
+}
244
+
245
+const List<Color> Gradients1 = [
246
+  Color(0xFF0EDED2),
247
+  Color(0xFF03A0FE),
248
+];
249
+
250
+const List<Color> Gradients2 = [
251
+  Color(0xFFFF9945),
252
+  Color(0xFFFc6076),
253
+];
254
+
255
+showAlertDialog(BuildContext context) {
256
+  // set up the button
257
+  Widget okButton = TextButton(
258
+    child: Text("Yes"),
259
+    onPressed: () {
260
+      Navigator.of(context, rootNavigator: true).pop();
261
+      Navigator.pushAndRemoveUntil(
262
+          context,
263
+          MaterialPageRoute(builder: (context) => LoginView()),
264
+          (route) => false);
265
+    },
266
+  );
267
+
268
+  Widget noButton = TextButton(
269
+    child: Text("No"),
270
+    onPressed: () {
271
+      Navigator.of(context, rootNavigator: true).pop();
272
+    },
273
+  );
274
+
275
+  // set up the AlertDialog
276
+  AlertDialog alert = AlertDialog(
277
+    title: Text("HRIS Self Service"),
278
+    content: Text("Are you sure you want to logout from this Application?"),
279
+    actions: [noButton, okButton],
280
+  );
281
+
282
+  // show the dialog
283
+  showDialog(
284
+    context: context,
285
+    builder: (BuildContext context) {
286
+      return alert;
287
+    },
288
+  );
289
+}

+ 178
- 0
lib/Screens/Splash/background.dart Visa fil

@@ -0,0 +1,178 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class Background extends StatelessWidget {
4
+  const Background({Key? key}) : super(key: key);
5
+
6
+  @override
7
+  Widget build(BuildContext context) {
8
+    return Scaffold(
9
+      resizeToAvoidBottomInset: false,
10
+      backgroundColor: Colors.white,
11
+      body: Column(
12
+        children: <Widget>[
13
+          new Stack(
14
+            alignment: Alignment.bottomCenter,
15
+            children: <Widget>[
16
+              WavyHeader()
17
+            ],
18
+          ),
19
+          Expanded(
20
+            child: Container(),
21
+          ),
22
+          Stack(
23
+            alignment: Alignment.bottomLeft,
24
+            children: <Widget>[
25
+              WavyFooter(),
26
+              CirclePink(),
27
+              CircleYellow(),
28
+            ],
29
+          )
30
+        ],
31
+      ),
32
+    );
33
+  }
34
+}
35
+
36
+const List<Color> orangeGradients = [
37
+  /*Color(0xFFFF9844),
38
+  Color(0xFFFE8853),
39
+  Color(0xFFFD7267),*/
40
+  Color(0xFFD21404),
41
+  Color(0xFFFD7267)
42
+];
43
+
44
+const List<Color> aquaGradients = [
45
+  Color(0xFF8EF7DA),
46
+  Color(0xFF5AEAF1),
47
+  Colors.blueAccent,
48
+];
49
+
50
+class WavyHeader extends StatelessWidget {
51
+  @override
52
+  Widget build(BuildContext context) {
53
+    return ClipPath(
54
+      clipper: TopWaveClipper(),
55
+      child: Container(
56
+        decoration: BoxDecoration(
57
+          gradient: LinearGradient(
58
+              colors: orangeGradients,
59
+              begin: Alignment.topLeft,
60
+              end: Alignment.center),
61
+        ),
62
+        height: MediaQuery.of(context).size.height / 2.5,
63
+      ),
64
+    );
65
+  }
66
+}
67
+
68
+class WavyFooter extends StatelessWidget {
69
+  @override
70
+  Widget build(BuildContext context) {
71
+    return ClipPath(
72
+      clipper: FooterWaveClipper(),
73
+      child: Container(
74
+        decoration: BoxDecoration(
75
+          gradient: LinearGradient(
76
+              colors: aquaGradients,
77
+              begin: Alignment.center,
78
+              end: Alignment.bottomRight),
79
+        ),
80
+        height: MediaQuery.of(context).size.height / 3,
81
+      ),
82
+    );
83
+  }
84
+}
85
+
86
+class CirclePink extends StatelessWidget {
87
+  @override
88
+  Widget build(BuildContext context) {
89
+    return Transform.translate(
90
+      offset: Offset(-70.0, 90.0),
91
+      child: Material(
92
+        color: Color(0xFFFF9844),
93
+        child: Padding(padding: EdgeInsets.all(120)),
94
+        shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
95
+      ),
96
+    );
97
+  }
98
+}
99
+
100
+class CircleYellow extends StatelessWidget {
101
+  @override
102
+  Widget build(BuildContext context) {
103
+    return Transform.translate(
104
+      offset: Offset(0.0, 210.0),
105
+      child: Material(
106
+        color: Colors.yellow,
107
+        child: Padding(padding: EdgeInsets.all(140)),
108
+        shape: CircleBorder(side: BorderSide(color: Colors.white, width: 15.0)),
109
+      ),
110
+    );
111
+  }
112
+}
113
+
114
+class TopWaveClipper extends CustomClipper<Path> {
115
+  @override
116
+  Path getClip(Size size) {
117
+    // This is where we decide what part of our image is going to be visible.
118
+    var path = Path();
119
+    path.lineTo(0.0, size.height);
120
+
121
+    var firstControlPoint = new Offset(size.width / 7, size.height - 30);
122
+    var firstEndPoint = new Offset(size.width / 6, size.height / 1.5);
123
+
124
+    path.quadraticBezierTo(firstControlPoint.dx, firstControlPoint.dy,
125
+        firstEndPoint.dx, firstEndPoint.dy);
126
+
127
+    var secondControlPoint = Offset(size.width / 5, size.height / 4);
128
+    var secondEndPoint = Offset(size.width / 1.5, size.height / 5);
129
+    path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
130
+        secondEndPoint.dx, secondEndPoint.dy);
131
+
132
+    var thirdControlPoint =
133
+        Offset(size.width - (size.width / 9), size.height / 6);
134
+    var thirdEndPoint = Offset(size.width, 0.0);
135
+    path.quadraticBezierTo(thirdControlPoint.dx, thirdControlPoint.dy,
136
+        thirdEndPoint.dx, thirdEndPoint.dy);
137
+
138
+    ///move from bottom right to top
139
+    path.lineTo(size.width, 0.0);
140
+
141
+    ///finally close the path by reaching start point from top right corner
142
+    path.close();
143
+    return path;
144
+  }
145
+
146
+  @override
147
+  bool shouldReclip(CustomClipper<Path> oldClipper) => false;
148
+}
149
+
150
+class FooterWaveClipper extends CustomClipper<Path> {
151
+  @override
152
+  Path getClip(Size size) {
153
+    var path = Path();
154
+    path.moveTo(size.width, 0.0);
155
+    path.lineTo(size.width, size.height);
156
+    path.lineTo(0.0, size.height);
157
+    path.lineTo(0.0, size.height - 60);
158
+    var secondControlPoint = Offset(size.width - (size.width / 6), size.height);
159
+    var secondEndPoint = Offset(size.width, 0.0);
160
+    path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
161
+        secondEndPoint.dx, secondEndPoint.dy);
162
+
163
+    return path;
164
+  }
165
+
166
+  @override
167
+  bool shouldReclip(CustomClipper<Path> oldClipper) => false;
168
+}
169
+
170
+class YellowCircleClipper extends CustomClipper<Rect> {
171
+  @override
172
+  Rect getClip(Size size) {
173
+    throw UnimplementedError();
174
+  }
175
+
176
+  @override
177
+  bool shouldReclip(CustomClipper<Rect> oldClipper) => false;
178
+}

+ 53
- 25
lib/Screens/Splash/splash_screen.dart Visa fil

@@ -1,8 +1,10 @@
1 1
 import 'dart:async';
2 2
 
3 3
 import 'package:flutter/material.dart';
4
-//import 'package:hris_selfservice_mobile/Screens/ForgotPassword/forgotPassword_screen.dart';
4
+import 'package:google_fonts/google_fonts.dart';
5 5
 import 'package:hris_selfservice_mobile/Screens/Login/login_screen.dart';
6
+import 'package:lottie/lottie.dart';
7
+import '../Splash/background.dart';
6 8
 
7 9
 class Splash extends StatefulWidget {
8 10
   const Splash({Key? key}) : super(key: key);
@@ -16,7 +18,7 @@ class _SplashState extends State<Splash> {
16 18
   void initState() {
17 19
     super.initState();
18 20
     Timer(
19
-        Duration(seconds: 5),
21
+        Duration(seconds: 10),
20 22
         () => Navigator.pushReplacement(
21 23
             context, MaterialPageRoute(builder: (context) => LoginView())));
22 24
   }
@@ -24,29 +26,55 @@ class _SplashState extends State<Splash> {
24 26
   @override
25 27
   Widget build(BuildContext context) {
26 28
     return Scaffold(
27
-      body: Container(
28
-          width: double.infinity,
29
-          height: double.infinity,
30
-          decoration: BoxDecoration(
31
-              gradient: LinearGradient(
32
-                  begin: Alignment.topRight,
33
-                  end: Alignment.bottomRight,
34
-                  colors: [Color(0xFFFF9844),
35
-                    Color(0xFFFE8853),
36
-                    Color(0xFFFD7267),])),
37
-          child: Center(
38
-            child: Column(
39
-              mainAxisAlignment: MainAxisAlignment.center,
40
-              crossAxisAlignment: CrossAxisAlignment.center,
41
-              children: [
42
-                Image.asset(
43
-                  'assets/images/logo.png',
44
-                  height: 300,
45
-                  width: 300,
46
-                )
47
-              ],
29
+        resizeToAvoidBottomInset: false,
30
+        body: Stack(
31
+          children: <Widget>[
32
+            Background(),
33
+            SplashScreen(),
34
+          ],
35
+        ));
36
+  }
37
+}
38
+
39
+class SplashScreen extends StatelessWidget {
40
+  const SplashScreen({Key? key}) : super(key: key);
41
+
42
+  @override
43
+  Widget build(BuildContext context) {
44
+    return Scaffold(
45
+        body: Container(
46
+      width: double.infinity,
47
+      height: double.infinity,
48
+      decoration: BoxDecoration(
49
+          gradient: LinearGradient(
50
+              begin: Alignment.topRight,
51
+              end: Alignment.bottomRight,
52
+              colors: [
53
+            Color(0xFFD21404),
54
+            Color(0xFFFD7267),
55
+          ])),
56
+      child: Center(
57
+        child: Column(
58
+          mainAxisAlignment: MainAxisAlignment.center,
59
+          crossAxisAlignment: CrossAxisAlignment.center,
60
+          children: [
61
+            Container(
62
+              /*decoration: BoxDecoration(
63
+                shape: BoxShape.circle,
64
+                color: Colors.white
65
+              ),*/
66
+              child: SizedBox(
67
+                width: 250,
68
+                height: 250,
69
+                child: LottieBuilder.asset('assets/animation/animation_1.json',
70
+                    repeat: true),
71
+              ),
48 72
             ),
49
-          )),
50
-    );
73
+            Text('Lottie Animation\nby Lottiefiles.com',
74
+                style: GoogleFonts.knewave(fontSize: 17, color: Colors.white))
75
+          ],
76
+        ),
77
+      ),
78
+    ));
51 79
   }
52 80
 }

+ 2
- 0
macos/Flutter/GeneratedPluginRegistrant.swift Visa fil

@@ -5,8 +5,10 @@
5 5
 import FlutterMacOS
6 6
 import Foundation
7 7
 
8
+import geolocator_apple
8 9
 import path_provider_macos
9 10
 
10 11
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
12
+  GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
11 13
   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
12 14
 }

+ 87
- 5
pubspec.lock Visa fil

@@ -1,13 +1,20 @@
1 1
 # Generated by pub
2 2
 # See https://dart.dev/tools/pub/glossary#lockfile
3 3
 packages:
4
+  animated_splash_screen:
5
+    dependency: "direct main"
6
+    description:
7
+      name: animated_splash_screen
8
+      url: "https://pub.dartlang.org"
9
+    source: hosted
10
+    version: "1.3.0"
4 11
   archive:
5 12
     dependency: transitive
6 13
     description:
7 14
       name: archive
8 15
       url: "https://pub.dartlang.org"
9 16
     source: hosted
10
-    version: "3.3.4"
17
+    version: "3.3.5"
11 18
   args:
12 19
     dependency: transitive
13 20
     description:
@@ -85,6 +92,13 @@ packages:
85 92
       url: "https://pub.dartlang.org"
86 93
     source: hosted
87 94
     version: "1.0.5"
95
+  double_back_to_close:
96
+    dependency: "direct main"
97
+    description:
98
+      name: double_back_to_close
99
+      url: "https://pub.dartlang.org"
100
+    source: hosted
101
+    version: "2.0.0"
88 102
   fake_async:
89 103
     dependency: transitive
90 104
     description:
@@ -112,7 +126,7 @@ packages:
112 126
     source: sdk
113 127
     version: "0.0.0"
114 128
   flutter_launcher_icons:
115
-    dependency: "direct main"
129
+    dependency: "direct dev"
116 130
     description:
117 131
       name: flutter_launcher_icons
118 132
       url: "https://pub.dartlang.org"
@@ -137,6 +151,60 @@ packages:
137 151
     description: flutter
138 152
     source: sdk
139 153
     version: "0.0.0"
154
+  flutter_web_plugins:
155
+    dependency: transitive
156
+    description: flutter
157
+    source: sdk
158
+    version: "0.0.0"
159
+  fluttertoast:
160
+    dependency: "direct main"
161
+    description:
162
+      name: fluttertoast
163
+      url: "https://pub.dartlang.org"
164
+    source: hosted
165
+    version: "8.1.1"
166
+  geolocator:
167
+    dependency: "direct main"
168
+    description:
169
+      name: geolocator
170
+      url: "https://pub.dartlang.org"
171
+    source: hosted
172
+    version: "9.0.2"
173
+  geolocator_android:
174
+    dependency: transitive
175
+    description:
176
+      name: geolocator_android
177
+      url: "https://pub.dartlang.org"
178
+    source: hosted
179
+    version: "4.1.4"
180
+  geolocator_apple:
181
+    dependency: transitive
182
+    description:
183
+      name: geolocator_apple
184
+      url: "https://pub.dartlang.org"
185
+    source: hosted
186
+    version: "2.2.3"
187
+  geolocator_platform_interface:
188
+    dependency: transitive
189
+    description:
190
+      name: geolocator_platform_interface
191
+      url: "https://pub.dartlang.org"
192
+    source: hosted
193
+    version: "4.0.7"
194
+  geolocator_web:
195
+    dependency: transitive
196
+    description:
197
+      name: geolocator_web
198
+      url: "https://pub.dartlang.org"
199
+    source: hosted
200
+    version: "2.1.6"
201
+  geolocator_windows:
202
+    dependency: transitive
203
+    description:
204
+      name: geolocator_windows
205
+      url: "https://pub.dartlang.org"
206
+    source: hosted
207
+    version: "0.1.1"
140 208
   google_fonts:
141 209
     dependency: "direct main"
142 210
     description:
@@ -171,7 +239,7 @@ packages:
171 239
       name: js
172 240
       url: "https://pub.dartlang.org"
173 241
     source: hosted
174
-    version: "0.6.5"
242
+    version: "0.6.4"
175 243
   json_annotation:
176 244
     dependency: transitive
177 245
     description:
@@ -179,6 +247,13 @@ packages:
179 247
       url: "https://pub.dartlang.org"
180 248
     source: hosted
181 249
     version: "4.7.0"
250
+  lottie:
251
+    dependency: "direct main"
252
+    description:
253
+      name: lottie
254
+      url: "https://pub.dartlang.org"
255
+    source: hosted
256
+    version: "2.0.0"
182 257
   matcher:
183 258
     dependency: transitive
184 259
     description:
@@ -200,6 +275,13 @@ packages:
200 275
       url: "https://pub.dartlang.org"
201 276
     source: hosted
202 277
     version: "1.8.0"
278
+  page_transition:
279
+    dependency: transitive
280
+    description:
281
+      name: page_transition
282
+      url: "https://pub.dartlang.org"
283
+    source: hosted
284
+    version: "2.0.9"
203 285
   path:
204 286
     dependency: transitive
205 287
     description:
@@ -234,7 +316,7 @@ packages:
234 316
       name: path_provider_android
235 317
       url: "https://pub.dartlang.org"
236 318
     source: hosted
237
-    version: "2.0.21"
319
+    version: "2.0.22"
238 320
   path_provider_ios:
239 321
     dependency: transitive
240 322
     description:
@@ -396,4 +478,4 @@ packages:
396 478
     version: "3.1.1"
397 479
 sdks:
398 480
   dart: ">=2.18.4 <3.0.0"
399
-  flutter: ">=3.0.0"
481
+  flutter: ">=3.3.0"

+ 9
- 2
pubspec.yaml Visa fil

@@ -38,17 +38,23 @@ dependencies:
38 38
   # Use with the CupertinoIcons class for iOS style icons.
39 39
   cupertino_icons: ^1.0.2
40 40
   flutter_svg: ^1.1.6
41
-  flutter_launcher_icons: ^0.11.0
42 41
   flutter_staggered_grid_view: ^0.6.2
42
+  double_back_to_close: ^2.0.0
43
+  animated_splash_screen: ^1.3.0
44
+  lottie: ^2.0.0
45
+  geolocator: ^9.0.2
46
+  fluttertoast: ^8.1.1
43 47
 
44 48
 dev_dependencies:
45 49
   flutter_test:
46 50
     sdk: flutter
47 51
 
52
+  flutter_launcher_icons: ^0.11.0
53
+
48 54
 flutter_icons:
49 55
   android: true
50 56
   ios: true
51
-  image_path: "assets/images/login_bottom.png"
57
+  image_path: "assets/images/logo.png"
52 58
 
53 59
   # The "flutter_lints" package below contains a set of recommended lints to
54 60
   # encourage good coding practices. The lint set provided by the package is
@@ -74,6 +80,7 @@ flutter:
74 80
     - assets/images/menu/
75 81
     - assets/icons/
76 82
     - assets/icons/menu/
83
+    - assets/animation/
77 84
   #   - images/a_dot_burr.jpeg
78 85
   #   - images/a_dot_ham.jpeg
79 86
 

+ 3
- 0
windows/flutter/generated_plugin_registrant.cc Visa fil

@@ -6,6 +6,9 @@
6 6
 
7 7
 #include "generated_plugin_registrant.h"
8 8
 
9
+#include <geolocator_windows/geolocator_windows.h>
9 10
 
10 11
 void RegisterPlugins(flutter::PluginRegistry* registry) {
12
+  GeolocatorWindowsRegisterWithRegistrar(
13
+      registry->GetRegistrarForPlugin("GeolocatorWindows"));
11 14
 }

+ 1
- 0
windows/flutter/generated_plugins.cmake Visa fil

@@ -3,6 +3,7 @@
3 3
 #
4 4
 
5 5
 list(APPEND FLUTTER_PLUGIN_LIST
6
+  geolocator_windows
6 7
 )
7 8
 
8 9
 list(APPEND FLUTTER_FFI_PLUGIN_LIST

Laddar…
Avbryt
Spara