|
@@ -4,6 +4,7 @@ import 'dart:typed_data';
|
4
|
4
|
import 'package:double_back_to_close/double_back_to_close.dart';
|
5
|
5
|
import 'package:flutter/material.dart';
|
6
|
6
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
7
|
+import 'package:focus_detector/focus_detector.dart';
|
7
|
8
|
import 'package:google_fonts/google_fonts.dart';
|
8
|
9
|
import 'package:hris_selfservice_mobile/Screens/Menu/About/about_screen.dart';
|
9
|
10
|
import 'package:hris_selfservice_mobile/Screens/Menu/Absensi/absensi_screen.dart';
|
|
@@ -17,7 +18,6 @@ import 'package:shared_preferences/shared_preferences.dart';
|
17
|
18
|
import 'dart:developer' as logDev;
|
18
|
19
|
import '../Settings/RequestHttp/getDetail_post.dart';
|
19
|
20
|
import '../Settings/RequestHttp/getProfileImage_post.dart';
|
20
|
|
-import 'package:location/location.dart';
|
21
|
21
|
|
22
|
22
|
|
23
|
23
|
var _imageToShow;
|
|
@@ -35,15 +35,7 @@ class HomeView extends StatefulWidget {
|
35
|
35
|
@override
|
36
|
36
|
_HomeView createState() => _HomeView();
|
37
|
37
|
}
|
38
|
|
-
|
39
|
|
-class _HomeView extends State<HomeView> {
|
40
|
|
- @override
|
41
|
|
- initState() {
|
42
|
|
- getDetail();
|
43
|
|
- _imageToShow = AssetImage('assets/images/ic_administrator.png');
|
44
|
|
- WidgetsBinding.instance.addPostFrameCallback((_) async {
|
45
|
|
- /* final location = await getLocation();
|
46
|
|
- logDev.log("Location: ${location.latitude}, ${location.longitude}");*/
|
|
38
|
+/*WidgetsBinding.instance.addPostFrameCallback((_) async {
|
47
|
39
|
ProgressDialog loading = ProgressDialog(context);
|
48
|
40
|
loading = ProgressDialog(context,
|
49
|
41
|
type: ProgressDialogType.normal,
|
|
@@ -67,7 +59,14 @@ class _HomeView extends State<HomeView> {
|
67
|
59
|
fontWeight: FontWeight.w600));
|
68
|
60
|
loading.show();
|
69
|
61
|
_imageToShow = getProfileImage();
|
70
|
|
- });
|
|
62
|
+ });*/
|
|
63
|
+
|
|
64
|
+class _HomeView extends State<HomeView> {
|
|
65
|
+ @override
|
|
66
|
+ initState() {
|
|
67
|
+ getDetail();
|
|
68
|
+ _imageToShow = AssetImage('assets/images/ic_administrator.png');
|
|
69
|
+ super.initState();
|
71
|
70
|
}
|
72
|
71
|
|
73
|
72
|
//Get Profile image
|
|
@@ -110,7 +109,7 @@ class _HomeView extends State<HomeView> {
|
110
|
109
|
});
|
111
|
110
|
} else if (photo != "false") {
|
112
|
111
|
Uint8List decodedBytes = Base64Decoder().convert(photo);
|
113
|
|
- logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
|
|
112
|
+ //logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
|
114
|
113
|
setState(() {
|
115
|
114
|
_imageToShow = Image
|
116
|
115
|
.memory(decodedBytes, gaplessPlayback: true)
|
|
@@ -210,224 +209,315 @@ class _HomeView extends State<HomeView> {
|
210
|
209
|
}
|
211
|
210
|
}
|
212
|
211
|
|
213
|
|
-class HomeScreen extends StatelessWidget {
|
|
212
|
+class HomeScreen extends StatefulWidget {
|
|
213
|
+ @override
|
|
214
|
+ State<HomeScreen> createState() => _HomeScreenState();
|
|
215
|
+}
|
|
216
|
+
|
|
217
|
+class _HomeScreenState extends State<HomeScreen> {
|
|
218
|
+ //Get Profile image
|
|
219
|
+ getProfileImage() async {
|
|
220
|
+ final SharedPreferences prefs = await SharedPreferences.getInstance();
|
|
221
|
+ final session = prefs.getString('session');
|
|
222
|
+
|
|
223
|
+ ProgressDialog loading = ProgressDialog(context);
|
|
224
|
+ loading = ProgressDialog(context,
|
|
225
|
+ type: ProgressDialogType.normal,
|
|
226
|
+ isDismissible: false,
|
|
227
|
+ showLogs: true);
|
|
228
|
+ loading.style(
|
|
229
|
+ message: 'Please Wait .....',
|
|
230
|
+ borderRadius: 5,
|
|
231
|
+ backgroundColor: Colors.white,
|
|
232
|
+ progressWidget: CircularProgressIndicator(),
|
|
233
|
+ elevation: 10.0,
|
|
234
|
+ padding: EdgeInsets.all(10),
|
|
235
|
+ insetAnimCurve: Curves.easeInOut,
|
|
236
|
+ progress: 0.0,
|
|
237
|
+ maxProgress: 100.0,
|
|
238
|
+ progressTextStyle: TextStyle(
|
|
239
|
+ color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
|
|
240
|
+ messageTextStyle: TextStyle(
|
|
241
|
+ color: Colors.black,
|
|
242
|
+ fontSize: 15.0,
|
|
243
|
+ fontWeight: FontWeight.w600));
|
|
244
|
+
|
|
245
|
+ loading.show();
|
|
246
|
+ GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
|
|
247
|
+ Map<String, dynamic> object = json.decode(valueResult);
|
|
248
|
+ if (object.containsKey("result").toString() == "true") {
|
|
249
|
+ String status = object['result']['status'].toString();
|
|
250
|
+ logDev.log(status, name: "STATUS GET PROFILE");
|
|
251
|
+ if (status == "success") {
|
|
252
|
+ String photo = object['result']['photo'].toString();
|
|
253
|
+ if (photo == "false") {
|
|
254
|
+ setState(() {
|
|
255
|
+ _imageToShow = AssetImage('assets/images/ic_administrator.png');
|
|
256
|
+ });
|
|
257
|
+ } else if (photo != "false") {
|
|
258
|
+ Uint8List decodedBytes = Base64Decoder().convert(photo);
|
|
259
|
+ //logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
|
|
260
|
+ setState(() {
|
|
261
|
+ _imageToShow = Image
|
|
262
|
+ .memory(decodedBytes, gaplessPlayback: true)
|
|
263
|
+ .image;
|
|
264
|
+ });
|
|
265
|
+ }
|
|
266
|
+ } else if (status == "failed") {
|
|
267
|
+ String message = object['result']['message'].toString();
|
|
268
|
+ Fluttertoast.showToast(
|
|
269
|
+ msg: message,
|
|
270
|
+ toastLength: Toast.LENGTH_LONG,
|
|
271
|
+ gravity: ToastGravity.CENTER,
|
|
272
|
+ timeInSecForIosWeb: 1,
|
|
273
|
+ textColor: Colors.white,
|
|
274
|
+ fontSize: 16.0);
|
|
275
|
+ }
|
|
276
|
+ loading.hide();
|
|
277
|
+ } else {
|
|
278
|
+ Fluttertoast.showToast(
|
|
279
|
+ msg: "Server Response Error",
|
|
280
|
+ toastLength: Toast.LENGTH_SHORT,
|
|
281
|
+ gravity: ToastGravity.CENTER,
|
|
282
|
+ timeInSecForIosWeb: 1,
|
|
283
|
+ textColor: Colors.white,
|
|
284
|
+ fontSize: 16.0);
|
|
285
|
+ loading.hide();
|
|
286
|
+ }
|
|
287
|
+ });
|
|
288
|
+ return _imageToShow;
|
|
289
|
+ }
|
|
290
|
+
|
214
|
291
|
@override
|
215
|
292
|
Widget build(BuildContext context) {
|
216
|
293
|
var size = MediaQuery.of(context).size;
|
217
|
|
- return Scaffold(
|
218
|
|
- body: SingleChildScrollView(
|
219
|
|
- child: Stack(
|
220
|
|
- children: <Widget>[
|
221
|
|
- Container(
|
222
|
|
- height: size.height * 0.3,
|
223
|
|
- decoration: BoxDecoration(
|
224
|
|
- gradient: LinearGradient(
|
225
|
|
- begin: Alignment.topRight,
|
226
|
|
- end: Alignment.bottomRight,
|
227
|
|
- colors: [
|
228
|
|
- Color(0xFFD21404),
|
229
|
|
- Color(0xFFFD7267),
|
230
|
|
- ])),
|
231
|
|
- ),
|
232
|
|
- SafeArea(
|
233
|
|
- child: Padding(
|
234
|
|
- padding: EdgeInsets.all(20),
|
235
|
|
- child: Column(
|
236
|
|
- children: <Widget>[
|
237
|
|
- Align(
|
238
|
|
- alignment: Alignment.topRight,
|
239
|
|
- child: InkWell(
|
240
|
|
- child: Container(
|
241
|
|
- alignment: Alignment.center,
|
242
|
|
- height: 40,
|
243
|
|
- width: 40,
|
244
|
|
- child: Image.asset('assets/images/ic_settings.png')),
|
245
|
|
- onTap: () {
|
246
|
|
- Navigator.push(
|
247
|
|
- context,
|
248
|
|
- MaterialPageRoute(
|
249
|
|
- builder: (context) => SettingsScreen()));
|
250
|
|
- },
|
251
|
|
- ),
|
252
|
|
- ),
|
253
|
|
- Container(
|
254
|
|
- child: Stack(
|
255
|
|
- alignment: Alignment.topLeft,
|
256
|
|
- children: [
|
257
|
|
- Container(
|
258
|
|
- margin: EdgeInsets.only(top: ((size.width - 20) * 0.33) * 0.5),
|
259
|
|
- child: Card(
|
260
|
|
- elevation: 15,
|
|
294
|
+ return FocusDetector(
|
|
295
|
+ onFocusLost: (){
|
|
296
|
+ getProfileImage();
|
|
297
|
+ },
|
|
298
|
+ onFocusGained: (){
|
|
299
|
+ getProfileImage();
|
|
300
|
+ },
|
|
301
|
+ onForegroundLost: (){
|
|
302
|
+ getProfileImage();
|
|
303
|
+ },
|
|
304
|
+ onForegroundGained: (){
|
|
305
|
+ getProfileImage();
|
|
306
|
+ },
|
|
307
|
+ child: Scaffold(
|
|
308
|
+ body: SingleChildScrollView(
|
|
309
|
+ child: Stack(
|
|
310
|
+ children: <Widget>[
|
|
311
|
+ Container(
|
|
312
|
+ height: size.height * 0.3,
|
|
313
|
+ decoration: BoxDecoration(
|
|
314
|
+ gradient: LinearGradient(
|
|
315
|
+ begin: Alignment.topRight,
|
|
316
|
+ end: Alignment.bottomRight,
|
|
317
|
+ colors: [
|
|
318
|
+ Color(0xFFD21404),
|
|
319
|
+ Color(0xFFFD7267),
|
|
320
|
+ ])),
|
|
321
|
+ ),
|
|
322
|
+ SafeArea(
|
|
323
|
+ child: Padding(
|
|
324
|
+ padding: EdgeInsets.all(20),
|
|
325
|
+ child: Column(
|
|
326
|
+ children: <Widget>[
|
|
327
|
+ Align(
|
|
328
|
+ alignment: Alignment.topRight,
|
|
329
|
+ child: InkWell(
|
261
|
330
|
child: Container(
|
262
|
|
- height: size.width * 0.35,
|
263
|
|
- width: size.width - 20,
|
264
|
|
- padding: EdgeInsets.all(15),
|
265
|
|
- decoration: BoxDecoration(
|
266
|
|
- color: Colors.white,
|
267
|
|
- borderRadius:
|
268
|
|
- BorderRadius.all(Radius.circular(10))),
|
269
|
|
- child: Column(
|
270
|
|
- mainAxisAlignment: MainAxisAlignment.end,
|
271
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
272
|
|
- children: <Widget>[
|
273
|
|
- Text(name,
|
274
|
|
- maxLines: 2,
|
275
|
|
- overflow: TextOverflow.ellipsis,
|
276
|
|
- textAlign: TextAlign.center,
|
277
|
|
- style: GoogleFonts.inter(
|
278
|
|
- fontSize: 18,
|
279
|
|
- color: Colors.black,
|
280
|
|
- fontWeight: FontWeight.bold),
|
281
|
|
- ),
|
282
|
|
- Text(position,
|
283
|
|
- textAlign: TextAlign.center,
|
284
|
|
- style: GoogleFonts.inter(
|
285
|
|
- fontSize: 17, color: Colors.black),
|
286
|
|
- ),
|
287
|
|
- ],
|
288
|
|
- )),
|
|
331
|
+ alignment: Alignment.center,
|
|
332
|
+ height: 40,
|
|
333
|
+ width: 40,
|
|
334
|
+ child: Image.asset('assets/images/ic_settings.png')),
|
|
335
|
+ onTap: () {
|
|
336
|
+ Navigator.push(
|
|
337
|
+ context,
|
|
338
|
+ MaterialPageRoute(
|
|
339
|
+ builder: (context) => SettingsScreen()));
|
|
340
|
+ },
|
289
|
341
|
),
|
290
|
342
|
),
|
291
|
|
- Align(
|
292
|
|
- alignment: Alignment.topCenter,
|
293
|
|
- child: Container(
|
294
|
|
- margin: EdgeInsets.only(left: 15),
|
|
343
|
+ Container(
|
|
344
|
+ child: Stack(
|
295
|
345
|
alignment: Alignment.topLeft,
|
296
|
|
- height: (size.width - 20) * 0.33,
|
297
|
|
- width: (size.width - 20) * 0.33,
|
298
|
|
- decoration: BoxDecoration(
|
299
|
|
- color: Colors.black,
|
300
|
|
- image: DecorationImage(
|
301
|
|
- image: _imageToShow,
|
302
|
|
- fit: BoxFit.fill,
|
303
|
|
- ),
|
304
|
|
- shape: BoxShape.circle,
|
305
|
|
- ),
|
306
|
|
- ),
|
307
|
|
- ),
|
308
|
|
- ],
|
309
|
|
- ),
|
310
|
|
- ),
|
311
|
|
- GridView.count(
|
312
|
|
- shrinkWrap: true,
|
313
|
|
- physics: NeverScrollableScrollPhysics(),
|
314
|
|
- padding: EdgeInsets.only(top: 25, left: 5, right: 5),
|
315
|
|
- crossAxisSpacing: 15,
|
316
|
|
- mainAxisSpacing: 15,
|
317
|
|
- crossAxisCount: 2,
|
318
|
|
- children: <Widget>[
|
319
|
|
- InkWell(
|
320
|
|
- child: Container(
|
321
|
|
- decoration: BoxDecoration(
|
322
|
|
- color: Color(0xFFD0D0D0),
|
323
|
|
- borderRadius: BorderRadius.circular(5)),
|
324
|
|
- child: Column(
|
325
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
326
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
327
|
|
- children: <Widget>[
|
328
|
|
- Container(
|
329
|
|
- width: 75,
|
330
|
|
- height: 75,
|
331
|
|
- child: Image.asset(
|
332
|
|
- "assets/icons/menu/ic_absensi.png",
|
333
|
|
- fit: BoxFit.fill,
|
334
|
|
- alignment: Alignment.center,
|
335
|
|
- ),
|
336
|
|
- ),
|
337
|
|
- Container(
|
338
|
|
- margin: EdgeInsets.only(top: 10),
|
339
|
|
- padding: EdgeInsets.all(5),
|
340
|
|
- child: Text(
|
341
|
|
- 'Attendance',
|
342
|
|
- textAlign: TextAlign.center,
|
343
|
|
- style: GoogleFonts.acme(
|
344
|
|
- fontSize: 18, color: Colors.black),
|
345
|
|
- ),
|
346
|
|
- ),
|
347
|
|
- ],
|
348
|
|
- ),
|
349
|
|
- ),
|
350
|
|
- onTap: () {
|
351
|
|
- Navigator.push(
|
352
|
|
- context,
|
353
|
|
- MaterialPageRoute(
|
354
|
|
- builder: (context) => AbsensiScreen()));
|
355
|
|
- }),
|
356
|
|
- InkWell(
|
357
|
|
- child: Container(
|
358
|
|
- decoration: BoxDecoration(
|
359
|
|
- color: Color(0xFFD0D0D0),
|
360
|
|
- borderRadius: BorderRadius.circular(5)),
|
361
|
|
- child: Column(
|
362
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
363
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
364
|
|
- children: <Widget>[
|
|
346
|
+ children: [
|
365
|
347
|
Container(
|
366
|
|
- width: 75,
|
367
|
|
- height: 75,
|
368
|
|
- child: Image.asset(
|
369
|
|
- "assets/icons/menu/ic_slipgaji_2.png",
|
370
|
|
- fit: BoxFit.fill,
|
371
|
|
- alignment: Alignment.center),
|
|
348
|
+ margin: EdgeInsets.only(top: ((size.width - 20) * 0.33) * 0.5),
|
|
349
|
+ child: Card(
|
|
350
|
+ elevation: 15,
|
|
351
|
+ child: Container(
|
|
352
|
+ height: size.width * 0.35,
|
|
353
|
+ width: size.width - 20,
|
|
354
|
+ padding: EdgeInsets.all(15),
|
|
355
|
+ decoration: BoxDecoration(
|
|
356
|
+ color: Colors.white,
|
|
357
|
+ borderRadius:
|
|
358
|
+ BorderRadius.all(Radius.circular(10))),
|
|
359
|
+ child: Column(
|
|
360
|
+ mainAxisAlignment: MainAxisAlignment.end,
|
|
361
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
362
|
+ children: <Widget>[
|
|
363
|
+ Text(name,
|
|
364
|
+ maxLines: 2,
|
|
365
|
+ overflow: TextOverflow.ellipsis,
|
|
366
|
+ textAlign: TextAlign.center,
|
|
367
|
+ style: GoogleFonts.inter(
|
|
368
|
+ fontSize: 18,
|
|
369
|
+ color: Colors.black,
|
|
370
|
+ fontWeight: FontWeight.bold),
|
|
371
|
+ ),
|
|
372
|
+ Text(position,
|
|
373
|
+ textAlign: TextAlign.center,
|
|
374
|
+ style: GoogleFonts.inter(
|
|
375
|
+ fontSize: 17, color: Colors.black),
|
|
376
|
+ ),
|
|
377
|
+ ],
|
|
378
|
+ )),
|
|
379
|
+ ),
|
372
|
380
|
),
|
373
|
|
- Container(
|
374
|
|
- margin: EdgeInsets.only(top: 10),
|
375
|
|
- padding: EdgeInsets.all(5),
|
376
|
|
- child: Text(
|
377
|
|
- 'Salary Slip',
|
378
|
|
- textAlign: TextAlign.center,
|
379
|
|
- style: GoogleFonts.acme(
|
380
|
|
- fontSize: 18, color: Colors.black),
|
|
381
|
+ Align(
|
|
382
|
+ alignment: Alignment.topCenter,
|
|
383
|
+ child: Container(
|
|
384
|
+ margin: EdgeInsets.only(left: 15),
|
|
385
|
+ alignment: Alignment.topLeft,
|
|
386
|
+ height: (size.width - 20) * 0.33,
|
|
387
|
+ width: (size.width - 20) * 0.33,
|
|
388
|
+ decoration: BoxDecoration(
|
|
389
|
+ color: Colors.black,
|
|
390
|
+ image: DecorationImage(
|
|
391
|
+ image: _imageToShow,
|
|
392
|
+ fit: BoxFit.fill,
|
|
393
|
+ ),
|
|
394
|
+ shape: BoxShape.circle,
|
|
395
|
+ ),
|
381
|
396
|
),
|
382
|
397
|
),
|
383
|
398
|
],
|
384
|
399
|
),
|
385
|
400
|
),
|
386
|
|
- onTap: () {
|
387
|
|
- Navigator.push(
|
388
|
|
- context,
|
389
|
|
- MaterialPageRoute(
|
390
|
|
- builder: (context) => SlipGajiScreen()));
|
391
|
|
- },
|
392
|
|
- ),
|
393
|
|
- InkWell(
|
394
|
|
- child: Container(
|
395
|
|
- decoration: BoxDecoration(
|
396
|
|
- color: Color(0xFFD0D0D0),
|
397
|
|
- borderRadius: BorderRadius.circular(5)),
|
398
|
|
- child: Column(
|
399
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
400
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
401
|
|
- children: <Widget>[
|
402
|
|
- Container(
|
403
|
|
- width: 70,
|
404
|
|
- height: 70,
|
405
|
|
- child: Image.asset(
|
406
|
|
- "assets/icons/menu/ic_cuti_2.png",
|
407
|
|
- fit: BoxFit.fill,
|
408
|
|
- alignment: Alignment.center),
|
|
401
|
+ GridView.count(
|
|
402
|
+ shrinkWrap: true,
|
|
403
|
+ physics: NeverScrollableScrollPhysics(),
|
|
404
|
+ padding: EdgeInsets.only(top: 25, left: 5, right: 5),
|
|
405
|
+ crossAxisSpacing: 15,
|
|
406
|
+ mainAxisSpacing: 15,
|
|
407
|
+ crossAxisCount: 2,
|
|
408
|
+ children: <Widget>[
|
|
409
|
+ InkWell(
|
|
410
|
+ child: Container(
|
|
411
|
+ decoration: BoxDecoration(
|
|
412
|
+ color: Color(0xFFD0D0D0),
|
|
413
|
+ borderRadius: BorderRadius.circular(5)),
|
|
414
|
+ child: Column(
|
|
415
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
416
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
417
|
+ children: <Widget>[
|
|
418
|
+ Container(
|
|
419
|
+ width: 75,
|
|
420
|
+ height: 75,
|
|
421
|
+ child: Image.asset(
|
|
422
|
+ "assets/icons/menu/ic_absensi.png",
|
|
423
|
+ fit: BoxFit.fill,
|
|
424
|
+ alignment: Alignment.center,
|
|
425
|
+ ),
|
|
426
|
+ ),
|
|
427
|
+ Container(
|
|
428
|
+ margin: EdgeInsets.only(top: 10),
|
|
429
|
+ padding: EdgeInsets.all(5),
|
|
430
|
+ child: Text(
|
|
431
|
+ 'Attendance',
|
|
432
|
+ textAlign: TextAlign.center,
|
|
433
|
+ style: GoogleFonts.acme(
|
|
434
|
+ fontSize: 18, color: Colors.black),
|
|
435
|
+ ),
|
|
436
|
+ ),
|
|
437
|
+ ],
|
|
438
|
+ ),
|
|
439
|
+ ),
|
|
440
|
+ onTap: () {
|
|
441
|
+ Navigator.push(
|
|
442
|
+ context,
|
|
443
|
+ MaterialPageRoute(
|
|
444
|
+ builder: (context) => AbsensiScreen()));
|
|
445
|
+ }),
|
|
446
|
+ InkWell(
|
|
447
|
+ child: Container(
|
|
448
|
+ decoration: BoxDecoration(
|
|
449
|
+ color: Color(0xFFD0D0D0),
|
|
450
|
+ borderRadius: BorderRadius.circular(5)),
|
|
451
|
+ child: Column(
|
|
452
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
453
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
454
|
+ children: <Widget>[
|
|
455
|
+ Container(
|
|
456
|
+ width: 75,
|
|
457
|
+ height: 75,
|
|
458
|
+ child: Image.asset(
|
|
459
|
+ "assets/icons/menu/ic_slipgaji_2.png",
|
|
460
|
+ fit: BoxFit.fill,
|
|
461
|
+ alignment: Alignment.center),
|
|
462
|
+ ),
|
|
463
|
+ Container(
|
|
464
|
+ margin: EdgeInsets.only(top: 10),
|
|
465
|
+ padding: EdgeInsets.all(5),
|
|
466
|
+ child: Text(
|
|
467
|
+ 'Pay Slip',
|
|
468
|
+ textAlign: TextAlign.center,
|
|
469
|
+ style: GoogleFonts.acme(
|
|
470
|
+ fontSize: 18, color: Colors.black),
|
|
471
|
+ ),
|
|
472
|
+ ),
|
|
473
|
+ ],
|
|
474
|
+ ),
|
409
|
475
|
),
|
410
|
|
- Container(
|
411
|
|
- margin: EdgeInsets.only(top: 10),
|
412
|
|
- padding: EdgeInsets.all(5),
|
413
|
|
- child: Text(
|
414
|
|
- 'Time Off Submission',
|
415
|
|
- textAlign: TextAlign.center,
|
416
|
|
- style: GoogleFonts.acme(
|
417
|
|
- fontSize: 18, color: Colors.black),
|
|
476
|
+ onTap: () {
|
|
477
|
+ Navigator.push(
|
|
478
|
+ context,
|
|
479
|
+ MaterialPageRoute(
|
|
480
|
+ builder: (context) => SlipGajiScreen()));
|
|
481
|
+ },
|
|
482
|
+ ),
|
|
483
|
+ InkWell(
|
|
484
|
+ child: Container(
|
|
485
|
+ decoration: BoxDecoration(
|
|
486
|
+ color: Color(0xFFD0D0D0),
|
|
487
|
+ borderRadius: BorderRadius.circular(5)),
|
|
488
|
+ child: Column(
|
|
489
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
490
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
491
|
+ children: <Widget>[
|
|
492
|
+ Container(
|
|
493
|
+ width: 70,
|
|
494
|
+ height: 70,
|
|
495
|
+ child: Image.asset(
|
|
496
|
+ "assets/icons/menu/ic_cuti_2.png",
|
|
497
|
+ fit: BoxFit.fill,
|
|
498
|
+ alignment: Alignment.center),
|
|
499
|
+ ),
|
|
500
|
+ Container(
|
|
501
|
+ margin: EdgeInsets.only(top: 10),
|
|
502
|
+ padding: EdgeInsets.all(5),
|
|
503
|
+ child: Text(
|
|
504
|
+ 'Time Off Submission',
|
|
505
|
+ textAlign: TextAlign.center,
|
|
506
|
+ style: GoogleFonts.acme(
|
|
507
|
+ fontSize: 18, color: Colors.black),
|
|
508
|
+ ),
|
|
509
|
+ ),
|
|
510
|
+ ],
|
418
|
511
|
),
|
419
|
512
|
),
|
420
|
|
- ],
|
421
|
|
- ),
|
422
|
|
- ),
|
423
|
|
- onTap: () {
|
424
|
|
- Navigator.push(
|
425
|
|
- context,
|
426
|
|
- MaterialPageRoute(
|
427
|
|
- builder: (context) => AjukanCutiScreen()));
|
428
|
|
- },
|
429
|
|
- ),
|
430
|
|
- /*InkWell(
|
|
513
|
+ onTap: () {
|
|
514
|
+ Navigator.push(
|
|
515
|
+ context,
|
|
516
|
+ MaterialPageRoute(
|
|
517
|
+ builder: (context) => AjukanCutiScreen()));
|
|
518
|
+ },
|
|
519
|
+ ),
|
|
520
|
+ /*InkWell(
|
431
|
521
|
child: Container(
|
432
|
522
|
decoration: BoxDecoration(
|
433
|
523
|
color: Color(0xFFD0D0D0),
|
|
@@ -462,126 +552,127 @@ class HomeScreen extends StatelessWidget {
|
462
|
552
|
builder: (context) => BeritaScreen()));
|
463
|
553
|
},
|
464
|
554
|
),*/
|
465
|
|
- InkWell(
|
466
|
|
- child: Container(
|
467
|
|
- decoration: BoxDecoration(
|
468
|
|
- color: Color(0xFFD0D0D0),
|
469
|
|
- borderRadius: BorderRadius.circular(5)),
|
470
|
|
- child: Column(
|
471
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
472
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
473
|
|
- children: <Widget>[
|
474
|
|
- Container(
|
475
|
|
- width: 70,
|
476
|
|
- height: 70,
|
477
|
|
- child: Image.asset(
|
478
|
|
- "assets/icons/menu/ic_surattugas_2.png",
|
479
|
|
- fit: BoxFit.fill,
|
480
|
|
- alignment: Alignment.center,
|
481
|
|
- ),
|
482
|
|
- ),
|
483
|
|
- Container(
|
484
|
|
- margin: EdgeInsets.only(top: 10),
|
485
|
|
- padding: EdgeInsets.all(5),
|
486
|
|
- child: Text(
|
487
|
|
- 'Assignment Letter',
|
488
|
|
- textAlign: TextAlign.center,
|
489
|
|
- style: GoogleFonts.acme(
|
490
|
|
- fontSize: 18, color: Colors.black),
|
|
555
|
+ InkWell(
|
|
556
|
+ child: Container(
|
|
557
|
+ decoration: BoxDecoration(
|
|
558
|
+ color: Color(0xFFD0D0D0),
|
|
559
|
+ borderRadius: BorderRadius.circular(5)),
|
|
560
|
+ child: Column(
|
|
561
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
562
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
563
|
+ children: <Widget>[
|
|
564
|
+ Container(
|
|
565
|
+ width: 70,
|
|
566
|
+ height: 70,
|
|
567
|
+ child: Image.asset(
|
|
568
|
+ "assets/icons/menu/ic_surattugas_2.png",
|
|
569
|
+ fit: BoxFit.fill,
|
|
570
|
+ alignment: Alignment.center,
|
|
571
|
+ ),
|
|
572
|
+ ),
|
|
573
|
+ Container(
|
|
574
|
+ margin: EdgeInsets.only(top: 10),
|
|
575
|
+ padding: EdgeInsets.all(5),
|
|
576
|
+ child: Text(
|
|
577
|
+ 'Assignment Letter',
|
|
578
|
+ textAlign: TextAlign.center,
|
|
579
|
+ style: GoogleFonts.acme(
|
|
580
|
+ fontSize: 18, color: Colors.black),
|
|
581
|
+ ),
|
|
582
|
+ ),
|
|
583
|
+ ],
|
491
|
584
|
),
|
492
|
585
|
),
|
493
|
|
- ],
|
494
|
|
- ),
|
495
|
|
- ),
|
496
|
|
- onTap: () {
|
497
|
|
- Navigator.push(
|
498
|
|
- context,
|
499
|
|
- MaterialPageRoute(
|
500
|
|
- builder: (context) => SuratTugas_Screen()));
|
501
|
|
- },
|
502
|
|
- ),
|
503
|
|
- InkWell(
|
504
|
|
- child: Container(
|
505
|
|
- decoration: BoxDecoration(
|
506
|
|
- color: Color(0xFFD0D0D0),
|
507
|
|
- borderRadius: BorderRadius.circular(5)),
|
508
|
|
- child: Column(
|
509
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
510
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
511
|
|
- children: <Widget>[
|
512
|
|
- Container(
|
513
|
|
- width: 70,
|
514
|
|
- height: 70,
|
515
|
|
- child: Image.asset(
|
516
|
|
- "assets/icons/menu/ic_reimburse.png",
|
517
|
|
- fit: BoxFit.fill,
|
518
|
|
- alignment: Alignment.center),
|
519
|
|
- ),
|
520
|
|
- Container(
|
521
|
|
- margin: EdgeInsets.only(top: 10),
|
522
|
|
- padding: EdgeInsets.all(5),
|
523
|
|
- child: Text(
|
524
|
|
- 'Reimburse',
|
525
|
|
- textAlign: TextAlign.center,
|
526
|
|
- style: GoogleFonts.acme(
|
527
|
|
- fontSize: 18, color: Colors.black),
|
|
586
|
+ onTap: () {
|
|
587
|
+ Navigator.push(
|
|
588
|
+ context,
|
|
589
|
+ MaterialPageRoute(
|
|
590
|
+ builder: (context) => SuratTugas_Screen()));
|
|
591
|
+ },
|
|
592
|
+ ),
|
|
593
|
+ InkWell(
|
|
594
|
+ child: Container(
|
|
595
|
+ decoration: BoxDecoration(
|
|
596
|
+ color: Color(0xFFD0D0D0),
|
|
597
|
+ borderRadius: BorderRadius.circular(5)),
|
|
598
|
+ child: Column(
|
|
599
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
600
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
601
|
+ children: <Widget>[
|
|
602
|
+ Container(
|
|
603
|
+ width: 70,
|
|
604
|
+ height: 70,
|
|
605
|
+ child: Image.asset(
|
|
606
|
+ "assets/icons/menu/ic_reimburse.png",
|
|
607
|
+ fit: BoxFit.fill,
|
|
608
|
+ alignment: Alignment.center),
|
|
609
|
+ ),
|
|
610
|
+ Container(
|
|
611
|
+ margin: EdgeInsets.only(top: 10),
|
|
612
|
+ padding: EdgeInsets.all(5),
|
|
613
|
+ child: Text(
|
|
614
|
+ 'Reimburse',
|
|
615
|
+ textAlign: TextAlign.center,
|
|
616
|
+ style: GoogleFonts.acme(
|
|
617
|
+ fontSize: 18, color: Colors.black),
|
|
618
|
+ ),
|
|
619
|
+ ),
|
|
620
|
+ ],
|
528
|
621
|
),
|
529
|
622
|
),
|
530
|
|
- ],
|
531
|
|
- ),
|
532
|
|
- ),
|
533
|
|
- onTap: () {
|
534
|
|
- Navigator.push(
|
535
|
|
- context,
|
536
|
|
- MaterialPageRoute(
|
537
|
|
- builder: (context) => ReimburseScreen()));
|
538
|
|
- },
|
539
|
|
- ),
|
540
|
|
- InkWell(
|
541
|
|
- child: Container(
|
542
|
|
- decoration: BoxDecoration(
|
543
|
|
- color: Color(0xFFD0D0D0),
|
544
|
|
- borderRadius: BorderRadius.circular(5)),
|
545
|
|
- child: Column(
|
546
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
547
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
548
|
|
- children: <Widget>[
|
549
|
|
- Container(
|
550
|
|
- width: 70,
|
551
|
|
- height: 70,
|
552
|
|
- child: Image.asset(
|
553
|
|
- "assets/icons/menu/ic_about_2.png",
|
554
|
|
- fit: BoxFit.fill,
|
555
|
|
- alignment: Alignment.center),
|
556
|
|
- ),
|
557
|
|
- Container(
|
558
|
|
- margin: EdgeInsets.only(top: 10),
|
559
|
|
- padding: EdgeInsets.all(5),
|
560
|
|
- child: Text(
|
561
|
|
- 'About',
|
562
|
|
- textAlign: TextAlign.center,
|
563
|
|
- style: GoogleFonts.acme(
|
564
|
|
- fontSize: 18, color: Colors.black),
|
|
623
|
+ onTap: () {
|
|
624
|
+ Navigator.push(
|
|
625
|
+ context,
|
|
626
|
+ MaterialPageRoute(
|
|
627
|
+ builder: (context) => ReimburseScreen()));
|
|
628
|
+ },
|
|
629
|
+ ),
|
|
630
|
+ InkWell(
|
|
631
|
+ child: Container(
|
|
632
|
+ decoration: BoxDecoration(
|
|
633
|
+ color: Color(0xFFD0D0D0),
|
|
634
|
+ borderRadius: BorderRadius.circular(5)),
|
|
635
|
+ child: Column(
|
|
636
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
637
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
638
|
+ children: <Widget>[
|
|
639
|
+ Container(
|
|
640
|
+ width: 70,
|
|
641
|
+ height: 70,
|
|
642
|
+ child: Image.asset(
|
|
643
|
+ "assets/icons/menu/ic_about_2.png",
|
|
644
|
+ fit: BoxFit.fill,
|
|
645
|
+ alignment: Alignment.center),
|
|
646
|
+ ),
|
|
647
|
+ Container(
|
|
648
|
+ margin: EdgeInsets.only(top: 10),
|
|
649
|
+ padding: EdgeInsets.all(5),
|
|
650
|
+ child: Text(
|
|
651
|
+ 'About',
|
|
652
|
+ textAlign: TextAlign.center,
|
|
653
|
+ style: GoogleFonts.acme(
|
|
654
|
+ fontSize: 18, color: Colors.black),
|
|
655
|
+ ),
|
|
656
|
+ ),
|
|
657
|
+ ],
|
565
|
658
|
),
|
566
|
659
|
),
|
567
|
|
- ],
|
568
|
|
- ),
|
569
|
|
- ),
|
570
|
|
- onTap: () {
|
571
|
|
- Navigator.push(
|
572
|
|
- context,
|
573
|
|
- MaterialPageRoute(
|
574
|
|
- builder: (context) => AboutScreen()));
|
575
|
|
- },
|
576
|
|
- ),
|
577
|
|
- ],
|
578
|
|
- )
|
579
|
|
- ],
|
580
|
|
- ),
|
|
660
|
+ onTap: () {
|
|
661
|
+ Navigator.push(
|
|
662
|
+ context,
|
|
663
|
+ MaterialPageRoute(
|
|
664
|
+ builder: (context) => AboutScreen()));
|
|
665
|
+ },
|
|
666
|
+ ),
|
|
667
|
+ ],
|
|
668
|
+ )
|
|
669
|
+ ],
|
|
670
|
+ ),
|
|
671
|
+ ),
|
|
672
|
+ ),
|
|
673
|
+ ],
|
581
|
674
|
),
|
582
|
|
- ),
|
583
|
|
- ],
|
584
|
|
- ),
|
585
|
|
- ));
|
|
675
|
+ )),
|
|
676
|
+ );
|
586
|
677
|
}
|
587
|
678
|
}
|