Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

home_screen.dart 34KB

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