Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

home_screen.dart 34KB

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