From c4b7046a90dadafcf0f3d141a17e21eeb1318754 Mon Sep 17 00:00:00 2001 From: devmirza121 Date: Tue, 1 Mar 2022 10:39:16 +0300 Subject: [PATCH] Dashboard API's 1.3 --- assets/icons/create_req.svg | 7 +++ assets/icons/home.svg | 7 +++ assets/icons/item_for_sale.svg | 3 + assets/icons/work_list.svg | 15 +++++ lib/ui/landing/dashboard_screen.dart | 65 +++++++++++++++++++++- lib/ui/landing/widget/services_widget.dart | 25 +++++---- lib/ui/login/login_screen.dart | 2 +- 7 files changed, 110 insertions(+), 14 deletions(-) create mode 100644 assets/icons/create_req.svg create mode 100644 assets/icons/home.svg create mode 100644 assets/icons/item_for_sale.svg create mode 100644 assets/icons/work_list.svg diff --git a/assets/icons/create_req.svg b/assets/icons/create_req.svg new file mode 100644 index 0000000..a87e809 --- /dev/null +++ b/assets/icons/create_req.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/home.svg b/assets/icons/home.svg new file mode 100644 index 0000000..fb67997 --- /dev/null +++ b/assets/icons/home.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/item_for_sale.svg b/assets/icons/item_for_sale.svg new file mode 100644 index 0000000..0a87567 --- /dev/null +++ b/assets/icons/item_for_sale.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/work_list.svg b/assets/icons/work_list.svg new file mode 100644 index 0000000..a802c53 --- /dev/null +++ b/assets/icons/work_list.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 92ea49d..747ef1c 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -46,7 +46,7 @@ class _DashboardScreenState extends State { data.fetchWorkListCounter(); data.fetchMissingSwipe(); data.fetchLeaveTicketBalance(); - // data.fetchMenuEntries(); + data.fetchMenuEntries(); } @override @@ -329,6 +329,69 @@ class _DashboardScreenState extends State { ) ], ), + bottomNavigationBar: BottomNavigationBar( + items: [ + BottomNavigationBarItem( + icon: Padding( + padding: const EdgeInsets.all(4.0), + child: SvgPicture.asset( + "assets/icons/home.svg", + width: 20, + height: 20, + ), + ), + label: 'Home', + ), + BottomNavigationBarItem( + icon: Padding( + padding: const EdgeInsets.all(4.0), + child: SvgPicture.asset( + "assets/icons/create_req.svg", + width: 20, + height: 20, + ), + ), + label: 'Create Request', + ), + BottomNavigationBarItem( + icon: Padding( + padding: const EdgeInsets.all(4.0), + child: SvgPicture.asset( + "assets/icons/work_list.svg", + width: 20, + height: 20, + ), + ), + label: 'Work List', + ), + BottomNavigationBarItem( + icon: Padding( + padding: const EdgeInsets.all(4.0), + child: SvgPicture.asset( + "assets/icons/item_for_sale.svg", + width: 20, + height: 20, + ), + ), + label: 'Items for Sale', + ), + ], + currentIndex: 0, + selectedLabelStyle: TextStyle( + fontSize: 8, + color: Color(0xff989898), + fontWeight: FontWeight.w600, + ), + unselectedLabelStyle: TextStyle( + fontSize: 8, + color: Color(0xff989898), + fontWeight: FontWeight.w600, + ), + type: BottomNavigationBarType.fixed, + selectedItemColor: Colors.black, + backgroundColor: Color(0xffF8F8F8), + onTap: (v) {}, + ), ); } } diff --git a/lib/ui/landing/widget/services_widget.dart b/lib/ui/landing/widget/services_widget.dart index f397a4c..89a0aa6 100644 --- a/lib/ui/landing/widget/services_widget.dart +++ b/lib/ui/landing/widget/services_widget.dart @@ -128,18 +128,19 @@ class ServicesWidget extends StatelessWidget { SizedBox( height: 105 + 26, child: ListView.separated( - shrinkWrap: true, - physics: const BouncingScrollPhysics(), - padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13), - scrollDirection: Axis.horizontal, - itemBuilder: (cxt, index) { - return AspectRatio( - aspectRatio: 105 / 105, - child: ServicesMenuShimmer(), - ); - }, - separatorBuilder: (cxt, index) => 9.width, - itemCount: 4), + shrinkWrap: true, + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.only(left: 21, right: 21, top: 13, bottom: 13), + scrollDirection: Axis.horizontal, + itemBuilder: (cxt, index) { + return AspectRatio( + aspectRatio: 105 / 105, + child: ServicesMenuShimmer(), + ); + }, + separatorBuilder: (cxt, index) => 9.width, + itemCount: 4, + ), ), ], ); diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart index 2353f99..fe7f118 100644 --- a/lib/ui/login/login_screen.dart +++ b/lib/ui/login/login_screen.dart @@ -63,7 +63,7 @@ class _LoginScreenState extends State { @override Widget build(BuildContext context) { username.text="15153"; - password.text="e123e123e123"; + password.text="s12s12s12"; return Scaffold( body: Column( children: [