step 16 : add drawer di home screen, sukses msg custom dialog untuk presensi selfie

This commit is contained in:
sindhu
2024-01-27 11:12:03 +07:00
parent a38a983561
commit 79c0729979
8 changed files with 1757 additions and 813 deletions

View File

@@ -77,22 +77,34 @@ class CustomDrawer extends HookConsumerWidget {
child: Drawer(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(0))),
borderRadius: BorderRadius.all(
Radius.circular(0),
),
),
child: Column(
children: [
Expanded(
child: ListView(
children: [
// Container(
// child: Image(
// image:
// AssetImage('images/logo_sismedika_landscape.png')),
// ),
Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(context: context, y: 50),
bottom: Constant.getActualYPhone(context: context, y: 10),
right: Constant.getActualXPhone(context: context, x: 24),
left: Constant.getActualXPhone(context: context, x: 24),
),
child: Container(
child: Image(
fit: BoxFit.cover,
image: AssetImage(
'images/logo_sismedika_landscape.png',
),
),
),
),
SizedBox(
height: Constant.getActualYPhone(context: context, y: 8),
),
Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(context: context, y: 10),
@@ -104,17 +116,16 @@ class CustomDrawer extends HookConsumerWidget {
width: Constant.getActualXPhone(context: context, x: 300),
),
),
Chip(
backgroundColor: Constant.textLightGrey.withOpacity(0.16),
label: Text(
M_CompanyName.value,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Constant.textLightGrey,
),
),
),
// Chip(
// backgroundColor: Constant.textLightGrey.withOpacity(0.16),
// label: Text(
// M_CompanyName.value,
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: Constant.textLightGrey,
// ),
// ),
// ),
ListTile(
leading: Icon(
Icons.home,
@@ -137,26 +148,47 @@ class CustomDrawer extends HookConsumerWidget {
Navigator.of(context).popAndPushNamed(homeRoute);
},
),
ListTile(
leading: Icon(
Icons.logout,
color: Constant.textLightGrey,
Icons.person,
color: (currentMenu == 5)
? Constant.textOrange
: Constant.textLightGrey,
),
title: Text(
'Logout',
style: TextStyle(color: Constant.textLightGrey),
'Profil',
style: TextStyle(
color: (currentMenu == 5)
? Constant.textOrange
: Constant.textLightGrey,
),
),
onTap: () {
// di set ke 0 lagi
ref.read(currentPageProvider.state).update((state) => 0);
// ref.read(logoutProvider.notifier).logout(
// M_UserID: selectedUser?.model.M_UserID ?? "",
// M_UserUsername:
// selectedUser?.model.M_UserUsername ?? "",
// );
// Handle navigation to Home screen
Navigator.pop(context);
ref.read(currentPageProvider.state).update((state) => 5);
// Navigator.of(context).popAndPushNamed(homeRoute);
},
),
// ListTile(
// leading: Icon(
// Icons.logout,
// color: Constant.textLightGrey,
// ),
// title: Text(
// 'Logout',
// style: TextStyle(color: Constant.textLightGrey),
// ),
// onTap: () {
// // di set ke 0 lagi
// ref.read(currentPageProvider.state).update((state) => 0);
// // ref.read(logoutProvider.notifier).logout(
// // M_UserID: selectedUser?.model.M_UserID ?? "",
// // M_UserUsername:
// // selectedUser?.model.M_UserUsername ?? "",
// // );
// },
// ),
],
),
),