GSI - Employe Self Service Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

864 lines
37 KiB

2 months ago
  1. import 'dart:async';
  2. import 'dart:convert';
  3. import 'dart:typed_data';
  4. import 'package:connectivity_plus/connectivity_plus.dart';
  5. import 'package:double_back_to_close/double_back_to_close.dart';
  6. import 'package:employee_selfservice_mobile/Screens/Menu/EventCalendar/eventCalendar_screen.dart';
  7. import 'package:employee_selfservice_mobile/Screens/Menu/IDP/idp_screen.dart';
  8. import 'package:employee_selfservice_mobile/Screens/NotificationCenter/NotificationCenter.dart';
  9. import 'package:flutter/cupertino.dart';
  10. import 'package:flutter/material.dart';
  11. import 'package:fluttertoast/fluttertoast.dart';
  12. import 'package:focus_detector/focus_detector.dart';
  13. import 'package:google_fonts/google_fonts.dart';
  14. import 'package:employee_selfservice_mobile/Screens/Menu/About/about_screen.dart';
  15. import 'package:employee_selfservice_mobile/Screens/Menu/Absensi/absensi_screen.dart';
  16. import 'package:employee_selfservice_mobile/Screens/Menu/AjukanCuti/ajukancuti_screen.dart';
  17. import 'package:employee_selfservice_mobile/Screens/Menu/Reimburse/reimburse_screen.dart';
  18. import 'package:employee_selfservice_mobile/Screens/Menu/SlipGaji/slipgaji_screen.dart';
  19. import 'package:employee_selfservice_mobile/Screens/Menu/SuratTugas/surattugas_screen.dart';
  20. import 'package:employee_selfservice_mobile/Screens/Settings/settings_screen.dart';
  21. import 'package:lottie/lottie.dart';
  22. import 'package:progress_dialog_null_safe/progress_dialog_null_safe.dart';
  23. import 'package:shared_preferences/shared_preferences.dart';
  24. import 'dart:developer' as logDev;
  25. import '../Menu/IPP/ipp_screen.dart';
  26. import '../Settings/RequestHttp/getDetail_post.dart';
  27. import '../Settings/RequestHttp/getProfileImage_post.dart';
  28. import 'package:internet_connection_checker/internet_connection_checker.dart';
  29. late String nameShared;
  30. String name = "",
  31. statusDetail = "",
  32. dateOfBirth = "",
  33. phone = "",
  34. email = "",
  35. address = "",
  36. position = "";
  37. var _imageToShow;
  38. class HomeView extends StatefulWidget {
  39. @override
  40. _HomeView createState() => _HomeView();
  41. }
  42. class _HomeView extends State<HomeView> {
  43. late StreamSubscription subscription;
  44. bool isDeviceConnected = false;
  45. bool isAlertSet = false;
  46. //var _imageToShow;
  47. @override
  48. initState() {
  49. getConnectivity();
  50. getDetail();
  51. _imageToShow = AssetImage('assets/images/ic_administrator.png');
  52. WidgetsBinding.instance.addPostFrameCallback((_) {
  53. getProfileImage();
  54. });
  55. super.initState();
  56. }
  57. getConnectivity() =>
  58. subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) async {
  59. isDeviceConnected = await InternetConnectionChecker().hasConnection;
  60. if (!isDeviceConnected && isAlertSet == false) {
  61. showConnectivityDialogBox();
  62. setState(() => isAlertSet = true);
  63. }
  64. } as void Function(List<ConnectivityResult> event)?,
  65. );
  66. @override
  67. void dispose() {
  68. subscription.cancel();
  69. super.dispose();
  70. }
  71. //Get Profile image
  72. getProfileImage() async {
  73. final SharedPreferences prefs = await SharedPreferences.getInstance();
  74. final session = prefs.getString('session');
  75. ProgressDialog loading = ProgressDialog(context);
  76. loading = ProgressDialog(context,
  77. type: ProgressDialogType.normal,
  78. isDismissible: false,
  79. showLogs: true);
  80. loading.style(
  81. message: 'Please Wait .....',
  82. borderRadius: 5,
  83. backgroundColor: Colors.white,
  84. progressWidget: CircularProgressIndicator(),
  85. elevation: 10.0,
  86. padding: EdgeInsets.all(10),
  87. insetAnimCurve: Curves.easeInOut,
  88. progress: 0.0,
  89. maxProgress: 100.0,
  90. progressTextStyle: TextStyle(
  91. color: Colors.black, fontSize: 10.0, fontWeight: FontWeight.w400),
  92. messageTextStyle: TextStyle(
  93. color: Colors.black,
  94. fontSize: 15.0,
  95. fontWeight: FontWeight.w600));
  96. await loading.show();
  97. GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
  98. Map<String, dynamic> object = json.decode(valueResult);
  99. if (object.containsKey("result").toString() == "true") {
  100. String status = object['result']['status'].toString();
  101. logDev.log(status, name: "STATUS GET PROFILE");
  102. if (status == "success") {
  103. String photo = object['result']['photo'].toString();
  104. if (photo == "false") {
  105. setState(() {
  106. _imageToShow = AssetImage('assets/icons/ic_pp_2.png');
  107. });
  108. } else if (photo != "false") {
  109. Uint8List decodedBytes = Base64Decoder().convert(photo);
  110. setState(() {
  111. _imageToShow = Image.memory(decodedBytes, gaplessPlayback: true).image;
  112. });
  113. }
  114. } else if (status == "failed") {
  115. String message = object['result']['message'].toString();
  116. Fluttertoast.showToast(
  117. msg: message,
  118. toastLength: Toast.LENGTH_LONG,
  119. gravity: ToastGravity.CENTER,
  120. timeInSecForIosWeb: 1,
  121. textColor: Colors.white,
  122. fontSize: 16.0);
  123. }
  124. } else {
  125. Fluttertoast.showToast(
  126. msg: "Server Response Error",
  127. toastLength: Toast.LENGTH_SHORT,
  128. gravity: ToastGravity.CENTER,
  129. timeInSecForIosWeb: 1,
  130. textColor: Colors.white,
  131. fontSize: 16.0);
  132. }
  133. await loading.hide();
  134. });
  135. return _imageToShow;
  136. }
  137. //GetDetail
  138. getDetail() async {
  139. GetDetail_Post.connectToAPI().then((valueResult) async {
  140. Map<String, dynamic> object = json.decode(valueResult);
  141. if (object.containsKey("result").toString() == "true") {
  142. statusDetail = object['result']['status'].toString();
  143. String message = object['result']['message'].toString();
  144. if (statusDetail == "failed" || message == "User Not Found") {
  145. Fluttertoast.showToast(
  146. msg: message + ", Please login again!",
  147. toastLength: Toast.LENGTH_SHORT,
  148. gravity: ToastGravity.CENTER,
  149. timeInSecForIosWeb: 1,
  150. textColor: Colors.white,
  151. fontSize: 16.0);
  152. } else if (statusDetail != "failed") {
  153. name = object['result']['name'].toString();
  154. dateOfBirth = object['result']['date_of_birth'].toString();
  155. phone = object['result']['phone'].toString();
  156. email = object['result']['email'].toString();
  157. address = object['result']['address'].toString();
  158. position = object['result']['position'].toString();
  159. var prefs = await SharedPreferences.getInstance();
  160. if (position == "false") {
  161. position = "-";
  162. await prefs.setString('position', position);
  163. } else {
  164. await prefs.setString('position', position);
  165. }
  166. }
  167. } else {
  168. Fluttertoast.showToast(
  169. msg: "Server Response Error",
  170. toastLength: Toast.LENGTH_SHORT,
  171. gravity: ToastGravity.CENTER,
  172. timeInSecForIosWeb: 1,
  173. textColor: Colors.white,
  174. fontSize: 16.0);
  175. }
  176. });
  177. }
  178. int _selectedIndex = 0;
  179. void _onItemTapped(int index) {
  180. setState(() {
  181. _selectedIndex = index;
  182. if (index == 0) {
  183. }
  184. });
  185. }
  186. @override
  187. Widget build(BuildContext context) {
  188. return MaterialApp(
  189. home: DoubleBack(
  190. /*onFirstBackPress: (context) {
  191. final snackBar = SnackBar(content: Text("Double Back Press to Exit"));
  192. ScaffoldMessenger.of(context).showSnackBar(snackBar);
  193. },*/
  194. message: "Double Back Press to Exit",
  195. background: Colors.black38,
  196. backgroundRadius: 10,
  197. textStyle: TextStyle(
  198. fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white),
  199. child: Scaffold(
  200. resizeToAvoidBottomInset: false,
  201. //backgroundColor: Colors.white,
  202. body: Stack(
  203. children: <Widget>[
  204. //Background(),
  205. //HomeScreen(),
  206. BottomNavBar()
  207. ],
  208. )),
  209. ),
  210. );
  211. }
  212. showConnectivityDialogBox() =>
  213. showCupertinoDialog<String>(
  214. context: context,
  215. builder: (BuildContext context) =>
  216. CupertinoAlertDialog(
  217. title: const Text('No Connection'),
  218. content: const Text('Please check your internet connectivity'),
  219. actions: <Widget>[
  220. Column(
  221. children: [
  222. SizedBox(
  223. width: 250,
  224. height: 250,
  225. child: LottieBuilder.asset(
  226. //'assets/animation/animation_no_internet.json',
  227. 'assets/animation/animation_no_internet_3.json',
  228. repeat: true),
  229. ),
  230. ],
  231. ),
  232. TextButton(
  233. onPressed: () async {
  234. Navigator.pop(context, 'Cancel');
  235. setState(() => isAlertSet = false);
  236. isDeviceConnected =
  237. await InternetConnectionChecker().hasConnection;
  238. if (!isDeviceConnected && isAlertSet == false) {
  239. showConnectivityDialogBox();
  240. setState(() => isAlertSet = true);
  241. }
  242. },
  243. child: const Text('Retry'),
  244. ),
  245. ],
  246. ),
  247. );
  248. }
  249. class BottomNavBar extends StatefulWidget {
  250. const BottomNavBar({Key? key}) : super(key: key);
  251. @override
  252. State<BottomNavBar> createState() => _BottomNavBarState();
  253. }
  254. class _BottomNavBarState extends State<BottomNavBar> {
  255. List<Widget> _widgetOptions = <Widget>[
  256. HomeScreen(),
  257. NotificationCenter_Screen(),
  258. SettingsScreen(),
  259. ];
  260. int _selectedIndex = 0;
  261. void _onItemTapped(int index) {
  262. setState(() {
  263. _selectedIndex = index;
  264. });
  265. }
  266. @override
  267. Widget build(BuildContext context) {
  268. return Scaffold(
  269. body: _widgetOptions.elementAt(_selectedIndex),
  270. bottomNavigationBar: BottomNavigationBar(
  271. items: const <BottomNavigationBarItem>[
  272. BottomNavigationBarItem(
  273. icon: Icon(Icons.home),
  274. label: 'Home',
  275. ),
  276. BottomNavigationBarItem(
  277. icon: Icon(Icons.notifications),
  278. label: 'Notification',
  279. ), BottomNavigationBarItem(
  280. icon: Icon(Icons.person),
  281. label: 'Profile',
  282. ),
  283. ],
  284. currentIndex: _selectedIndex,
  285. selectedItemColor: Colors.white,
  286. backgroundColor: Color(0xFF5666b7),
  287. onTap: _onItemTapped),
  288. );
  289. }
  290. }
  291. class HomeScreen extends StatefulWidget {
  292. @override
  293. State<HomeScreen> createState() => _HomeScreenState();
  294. }
  295. class _HomeScreenState extends State<HomeScreen> {
  296. //Get Profile image
  297. getProfileImage() async {
  298. final SharedPreferences prefs = await SharedPreferences.getInstance();
  299. final session = prefs.getString('session');
  300. GetProfileImage_Post.connectToAPI(session!).then((valueResult) async {
  301. Map<String, dynamic> object = json.decode(valueResult);
  302. if (object.containsKey("result").toString() == "true") {
  303. String status = object['result']['status'].toString();
  304. logDev.log(status, name: "STATUS GET PROFILE");
  305. if (status == "success") {
  306. String photo = object['result']['photo'].toString();
  307. if (photo == "false") {
  308. setState(() {
  309. _imageToShow = AssetImage('assets/icons/ic_pp_2.png');
  310. });
  311. } else if (photo != "false") {
  312. Uint8List decodedBytes = Base64Decoder().convert(photo);
  313. //logDev.log(decodedBytes.toString(), name: "DECODED BYTES photo");
  314. setState(() {
  315. _imageToShow = Image.memory(decodedBytes, gaplessPlayback: true).image;
  316. });
  317. }
  318. } else if (status == "failed") {
  319. String message = object['result']['message'].toString();
  320. Fluttertoast.showToast(
  321. msg: message,
  322. toastLength: Toast.LENGTH_LONG,
  323. gravity: ToastGravity.CENTER,
  324. timeInSecForIosWeb: 1,
  325. textColor: Colors.white,
  326. fontSize: 16.0);
  327. }
  328. } else {
  329. Fluttertoast.showToast(
  330. msg: "Server Response Error",
  331. toastLength: Toast.LENGTH_SHORT,
  332. gravity: ToastGravity.CENTER,
  333. timeInSecForIosWeb: 1,
  334. textColor: Colors.white,
  335. fontSize: 16.0);
  336. }
  337. });
  338. return _imageToShow;
  339. }
  340. @override
  341. Widget build(BuildContext context) {
  342. var size = MediaQuery
  343. .of(context)
  344. .size;
  345. return FocusDetector(
  346. /*onVisibilityGained: (){
  347. getProfileImage();
  348. },
  349. onVisibilityLost: (){
  350. getProfileImage();
  351. },
  352. onFocusLost: (){
  353. getProfileImage();
  354. },*/
  355. onFocusGained: () {
  356. getProfileImage();
  357. },
  358. /* onForegroundLost: (){
  359. getProfileImage();
  360. },
  361. onForegroundGained: (){
  362. getProfileImage();
  363. },*/
  364. child: Scaffold(
  365. body: SingleChildScrollView(
  366. child: Stack(
  367. children: <Widget>[
  368. Container(
  369. height: size.height * 0.3,
  370. decoration: BoxDecoration(
  371. gradient: LinearGradient(
  372. begin: Alignment.topRight,
  373. end: Alignment.bottomRight,
  374. colors: [
  375. Color(0xFF4858A7),
  376. Color(0xFF6474C6),
  377. //Color(0xFF8C99DD),
  378. ])),
  379. ),
  380. SafeArea(
  381. child: Padding(
  382. padding: EdgeInsets.all(20),
  383. child: Column(
  384. children: <Widget>[
  385. /* Align(
  386. alignment: Alignment.topRight,
  387. child: InkWell(
  388. child: Container(
  389. alignment: Alignment.center,
  390. height: 40,
  391. width: 40,
  392. child: Image.asset('assets/images/ic_settings.png')),
  393. onTap: () {
  394. Navigator.push(
  395. context,
  396. MaterialPageRoute(
  397. builder: (context) => SettingsScreen()));
  398. },
  399. ),
  400. ),*/
  401. Container(
  402. child: Stack(
  403. alignment: Alignment.topLeft,
  404. children: [
  405. Container(
  406. margin: EdgeInsets.only(
  407. top: (((size.width - 20) * 0.33) * 0.5) +
  408. 40),
  409. child: Card(
  410. elevation: 15,
  411. child: Container(
  412. height: size.width * 0.35,
  413. width: size.width - 20,
  414. padding: EdgeInsets.all(15),
  415. decoration: BoxDecoration(
  416. color: Colors.white,
  417. borderRadius:
  418. BorderRadius.all(
  419. Radius.circular(10))),
  420. child: Column(
  421. mainAxisAlignment: MainAxisAlignment
  422. .end,
  423. crossAxisAlignment: CrossAxisAlignment
  424. .center,
  425. children: <Widget>[
  426. Text(name,
  427. maxLines: 2,
  428. overflow: TextOverflow.ellipsis,
  429. textAlign: TextAlign.center,
  430. style: GoogleFonts.inter(
  431. fontSize: size.width * 0.045,
  432. color: Colors.black,
  433. fontWeight: FontWeight.bold),
  434. ),
  435. Text(position,
  436. textAlign: TextAlign.center,
  437. style: GoogleFonts.inter(
  438. fontSize: size.width * 0.035,
  439. color: Colors.black),
  440. ),
  441. ],
  442. )),
  443. ),
  444. ),
  445. Align(
  446. alignment: Alignment.topCenter,
  447. child: Container(
  448. margin: EdgeInsets.only(left: 15, top: 40),
  449. alignment: Alignment.topLeft,
  450. height: (size.width - 20) * 0.33,
  451. width: (size.width - 20) * 0.33,
  452. decoration: BoxDecoration(
  453. color: Colors.black,
  454. image: DecorationImage(
  455. image: _imageToShow,
  456. fit: BoxFit.cover,
  457. ),
  458. shape: BoxShape.circle,
  459. ),
  460. ),
  461. ),
  462. ],
  463. ),
  464. ),
  465. GridView.count(
  466. shrinkWrap: true,
  467. physics: NeverScrollableScrollPhysics(),
  468. padding: EdgeInsets.only(top: 25, left: 5, right: 5),
  469. crossAxisSpacing: 15,
  470. mainAxisSpacing: 15,
  471. crossAxisCount: 2,
  472. childAspectRatio: 1.0,
  473. children: <Widget>[
  474. InkWell(
  475. child: Container(
  476. width: size.width,
  477. height: size.height,
  478. decoration: BoxDecoration(
  479. color: Color(0xFFD0D0D0),
  480. borderRadius: BorderRadius.circular(5)),
  481. child: Center(
  482. child: Column(
  483. crossAxisAlignment: CrossAxisAlignment.center,
  484. mainAxisAlignment: MainAxisAlignment.center,
  485. children: <Widget>[
  486. Container(
  487. width: size.width * 0.18,
  488. child: Image.asset(
  489. "assets/icons/menu/ic_absensi_3.png",
  490. fit: BoxFit.contain)
  491. ),
  492. Container(
  493. margin: EdgeInsets.only(top: 5),
  494. child: Text(
  495. 'Attendance',
  496. textAlign: TextAlign.center,
  497. style: GoogleFonts.acme(
  498. fontSize: size.width * 0.045,
  499. color: Colors.black),
  500. ),
  501. )
  502. ],
  503. ),
  504. )
  505. ),
  506. onTap: () {
  507. Navigator.push(
  508. context,
  509. MaterialPageRoute(
  510. builder: (context) =>
  511. AbsensiScreen()));
  512. }),
  513. InkWell(
  514. child: Container(
  515. width: size.width,
  516. height: size.height,
  517. decoration: BoxDecoration(
  518. color: Color(0xFFD0D0D0),
  519. borderRadius: BorderRadius.circular(5)),
  520. child: Column(
  521. crossAxisAlignment: CrossAxisAlignment.center,
  522. mainAxisAlignment: MainAxisAlignment.center,
  523. children: <Widget>[
  524. Container(
  525. width: size.width * 0.18,
  526. child: Image.asset(
  527. "assets/icons/menu/ic_slipgaji_4.png",
  528. fit: BoxFit.contain),
  529. ),
  530. Container(
  531. margin: EdgeInsets.only(top: 5),
  532. child: Text(
  533. 'Pay Slip',
  534. textAlign: TextAlign.center,
  535. style: GoogleFonts.acme(
  536. fontSize: size.width * 0.045,
  537. color: Colors.black),
  538. ),
  539. )
  540. ],
  541. ),
  542. ),
  543. onTap: () {
  544. Navigator.push(
  545. context,
  546. MaterialPageRoute(
  547. builder: (context) =>
  548. SlipGajiScreen()));
  549. },
  550. ),
  551. InkWell(
  552. child: Container(
  553. width: size.width,
  554. height: size.height,
  555. decoration: BoxDecoration(
  556. color: Color(0xFFD0D0D0),
  557. borderRadius: BorderRadius.circular(5)),
  558. child: Column(
  559. crossAxisAlignment: CrossAxisAlignment.center,
  560. mainAxisAlignment: MainAxisAlignment.center,
  561. children: <Widget>[
  562. Container(
  563. width: size.width * 0.18,
  564. child: Image.asset(
  565. "assets/icons/menu/ic_cuti_4.png",
  566. fit: BoxFit.contain),
  567. ),
  568. Container(
  569. margin: EdgeInsets.only(top: 5),
  570. child: Text(
  571. 'Leaves',
  572. textAlign: TextAlign.center,
  573. style: GoogleFonts.acme(
  574. fontSize: size.width * 0.045,
  575. color: Colors.black),
  576. ),
  577. )
  578. ],
  579. ),
  580. ),
  581. onTap: () {
  582. Navigator.push(
  583. context,
  584. MaterialPageRoute(
  585. builder: (context) =>
  586. AjukanCutiScreen()));
  587. },
  588. ),
  589. InkWell(
  590. child: Container(
  591. width: size.width,
  592. height: size.height,
  593. decoration: BoxDecoration(
  594. color: Color(0xFFD0D0D0),
  595. borderRadius: BorderRadius.circular(5)),
  596. child: Column(
  597. crossAxisAlignment: CrossAxisAlignment.center,
  598. mainAxisAlignment: MainAxisAlignment.center,
  599. children: <Widget>[
  600. Container(
  601. width: size.width * 0.18,
  602. child: Image.asset(
  603. "assets/icons/menu/ic_surattugas_3.png",
  604. fit: BoxFit.contain,
  605. ),
  606. ),
  607. Container(
  608. margin: EdgeInsets.only(top: 5),
  609. child: Text(
  610. 'Assignment Letter',
  611. textAlign: TextAlign.center,
  612. style: GoogleFonts.acme(
  613. fontSize: size.width * 0.045,
  614. color: Colors.black),
  615. ),
  616. )
  617. ],
  618. ),
  619. ),
  620. onTap: () {
  621. Navigator.push(
  622. context,
  623. MaterialPageRoute(
  624. builder: (context) =>
  625. SuratTugas_Screen()));
  626. },
  627. ),
  628. InkWell(
  629. child: Container(
  630. width: size.width,
  631. height: size.height,
  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: size.width * 0.18,
  641. child: Image.asset(
  642. "assets/icons/menu/ic_reimburse_4.png",
  643. fit: BoxFit.contain,
  644. ),
  645. ),
  646. Container(
  647. margin: EdgeInsets.only(top: 5),
  648. child: Text(
  649. 'Reimbursement',
  650. textAlign: TextAlign.center,
  651. style: GoogleFonts.acme(
  652. fontSize: size.width * 0.045,
  653. color: Colors.black),
  654. ),
  655. )
  656. ],
  657. ),
  658. ),
  659. onTap: () {
  660. Navigator.push(
  661. context,
  662. MaterialPageRoute(
  663. builder: (context) =>
  664. ReimburseScreen()));
  665. },
  666. ),
  667. InkWell(
  668. child: Container(
  669. width: size.width,
  670. height: size.height,
  671. decoration: BoxDecoration(
  672. color: Color(0xFFD0D0D0),
  673. borderRadius: BorderRadius.circular(5)),
  674. child: Column(
  675. crossAxisAlignment: CrossAxisAlignment.center,
  676. mainAxisAlignment: MainAxisAlignment.center,
  677. children: <Widget>[
  678. Container(
  679. width: size.width * 0.18,
  680. child: Image.asset(
  681. "assets/icons/menu/ic_idp_4.png",
  682. fit: BoxFit.contain,
  683. ),
  684. ),
  685. Container(
  686. margin: EdgeInsets.only(top: 5),
  687. child: Text(
  688. 'Individual\nDevelopment Plan',
  689. textAlign: TextAlign.center,
  690. style: GoogleFonts.acme(
  691. fontSize: size.width * 0.045,
  692. color: Colors.black),
  693. ),
  694. )
  695. ],
  696. ),
  697. ),
  698. onTap: () {
  699. Navigator.push(
  700. context,
  701. MaterialPageRoute(
  702. builder: (context) => IDPScreen()));
  703. },
  704. ),
  705. InkWell(
  706. child: Container(
  707. width: size.width,
  708. height: size.height,
  709. decoration: BoxDecoration(
  710. color: Color(0xFFD0D0D0),
  711. borderRadius: BorderRadius.circular(5)),
  712. child: Column(
  713. crossAxisAlignment: CrossAxisAlignment.center,
  714. mainAxisAlignment: MainAxisAlignment.center,
  715. children: <Widget>[
  716. Container(
  717. width: size.width * 0.18,
  718. child: Image.asset(
  719. "assets/icons/menu/ic_ipp_2.png",
  720. fit: BoxFit.contain,
  721. ),
  722. ),
  723. Container(
  724. margin: EdgeInsets.only(top: 5),
  725. child: Text(
  726. 'Individual\nPerformance Plan',
  727. textAlign: TextAlign.center,
  728. style: GoogleFonts.acme(
  729. fontSize: size.width * 0.045,
  730. color: Colors.black),
  731. ),
  732. )
  733. ],
  734. ),
  735. ),
  736. onTap: () {
  737. Navigator.push(
  738. context,
  739. MaterialPageRoute(
  740. builder: (context) => IPPScreen()));
  741. },
  742. ),
  743. InkWell(
  744. child: Container(
  745. width: size.width,
  746. height: size.height,
  747. decoration: BoxDecoration(
  748. color: Color(0xFFD0D0D0),
  749. borderRadius: BorderRadius.circular(5)),
  750. child: Column(
  751. crossAxisAlignment: CrossAxisAlignment.center,
  752. mainAxisAlignment: MainAxisAlignment.center,
  753. children: <Widget>[
  754. Container(
  755. width: size.width * 0.18,
  756. child: Image.asset(
  757. "assets/icons/menu/ic_eventcalendar.png",
  758. fit: BoxFit.contain,
  759. ),
  760. ),
  761. Container(
  762. margin: EdgeInsets.only(top: 5),
  763. child: Text(
  764. 'Event Calendar',
  765. textAlign: TextAlign.center,
  766. style: GoogleFonts.acme(
  767. fontSize: size.width * 0.045,
  768. color: Colors.black),
  769. ),
  770. )
  771. ],
  772. ),
  773. ),
  774. onTap: () {
  775. Navigator.push(
  776. context,
  777. MaterialPageRoute(
  778. builder: (context) => EventCalendarScreen()));
  779. },
  780. ),
  781. InkWell(
  782. child: Container(
  783. width: size.width,
  784. height: size.height,
  785. decoration: BoxDecoration(
  786. color: Color(0xFFD0D0D0),
  787. borderRadius: BorderRadius.circular(5)),
  788. child: Column(
  789. crossAxisAlignment: CrossAxisAlignment.center,
  790. mainAxisAlignment: MainAxisAlignment.center,
  791. children: <Widget>[
  792. Container(
  793. width: size.width * 0.18,
  794. child: Image.asset(
  795. "assets/icons/menu/ic_about_9.png",
  796. fit: BoxFit.contain,
  797. ),
  798. ),
  799. Container(
  800. margin: EdgeInsets.only(top: 5),
  801. child: Text(
  802. 'About',
  803. textAlign: TextAlign.center,
  804. style: GoogleFonts.acme(
  805. fontSize: size.width * 0.045,
  806. color: Colors.black),
  807. ),
  808. )
  809. ],
  810. ),
  811. ),
  812. onTap: () {
  813. Navigator.push(
  814. context,
  815. MaterialPageRoute(
  816. builder: (context) => AboutScreen()));
  817. },
  818. ),
  819. ],
  820. )
  821. ],
  822. ),
  823. ),
  824. ),
  825. /*Center(
  826. child: _widgetOptions.elementAt(_selectedIndex),
  827. )*/
  828. ],
  829. ),
  830. )
  831. ),
  832. );
  833. }
  834. }