No Description
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.

home_screen.dart 34KB

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