2 Commits

Author SHA1 Message Date
Stephen
d23236d6a3 [Drawer] 4. revisi height dan position version 2024-01-17 16:06:17 +07:00
Stephen
bfe30a7c17 [Drawer] 3. add height container 2024-01-17 15:04:07 +07:00

View File

@@ -91,22 +91,22 @@ class CustomDrawer extends HookConsumerWidget {
final currentMenu = ref.read(currentPageProvider); final currentMenu = ref.read(currentPageProvider);
return Drawer( return Container(
width: Constant.getActualXPhone(context: context, x: 300),
height: Constant.getActualYPhone(context: context, y: 844),
child: Drawer(
elevation: 0, elevation: 0,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(0))), borderRadius: BorderRadius.all(Radius.circular(0))),
child: Container( child: Column(
children: [
Expanded(
child: ListView( child: ListView(
// padding: EdgeInsets.only(
// top: Constant.getActualYPhone(context: context, y: 10),
// ),
children: [ children: [
Container( Container(
// decoration: BoxDecoration(
// border: Border(bottom: BorderSide(color: Colors.transparent)) // <--- use the global theme to change the dividerColor property
// ),
child: Image( child: Image(
image: AssetImage('images/logo_sismedika_landscape.png')), image:
AssetImage('images/logo_sismedika_landscape.png')),
), ),
SizedBox( SizedBox(
@@ -125,7 +125,6 @@ class CustomDrawer extends HookConsumerWidget {
), ),
), ),
// Expanded(
// child: Padding( // child: Padding(
// padding: EdgeInsets.only( // padding: EdgeInsets.only(
// left: Constant.getActualXPhone(context: context, x: 24), // left: Constant.getActualXPhone(context: context, x: 24),
@@ -180,9 +179,6 @@ class CustomDrawer extends HookConsumerWidget {
: Constant.textGreyv2, : Constant.textGreyv2,
), ),
), ),
// tileColor: (currentMenu == 0)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
onTap: () { onTap: () {
// Handle navigation to Home screen // Handle navigation to Home screen
Navigator.pop(context); Navigator.pop(context);
@@ -205,9 +201,6 @@ class CustomDrawer extends HookConsumerWidget {
: Constant.textGreyv2, : Constant.textGreyv2,
), ),
), ),
// tileColor: (currentMenu == 1)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
onTap: () { onTap: () {
// Handle navigation to Transaksi screen // Handle navigation to Transaksi screen
Navigator.pop(context); Navigator.pop(context);
@@ -230,9 +223,6 @@ class CustomDrawer extends HookConsumerWidget {
: Constant.textGreyv2, : Constant.textGreyv2,
), ),
), ),
// tileColor: (currentMenu == 2)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
onTap: () { onTap: () {
// Handle navigation to User screen // Handle navigation to User screen
Navigator.pop(context); Navigator.pop(context);
@@ -255,9 +245,6 @@ class CustomDrawer extends HookConsumerWidget {
: Constant.textGreyv2, : Constant.textGreyv2,
), ),
), ),
// tileColor: (currentMenu == 3)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
onTap: () { onTap: () {
// Handle navigation to Transaksi screen // Handle navigation to Transaksi screen
Navigator.pop(context); Navigator.pop(context);
@@ -265,44 +252,6 @@ class CustomDrawer extends HookConsumerWidget {
Navigator.pushNamed(context, reportRoute); Navigator.pushNamed(context, reportRoute);
}, },
), ),
// ListTile(
// title: Text(
// 'User',
// style: TextStyle(
// color: (currentMenu == 4)
// ? Constant.textWhite
// : Constant.textBlack,
// ),
// ),
// tileColor: (currentMenu == 4)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
// onTap: () {
// // Handle navigation to User screen
// Navigator.pop(context);
// ref.read(currentPageProvider.state).update((state) => 4);
// Navigator.pushNamed(context, userRoute);
// },
// ),
// ListTile(
// title: Text(
// 'Change Company',
// style: TextStyle(
// color: (currentMenu == 5)
// ? Constant.textWhite
// : Constant.textBlack,
// ),
// ),
// tileColor: (currentMenu == 5)
// ? Constant.pcBtnBackgroundColor
// : Colors.transparent,
// onTap: () {
// // Handle navigation to User screen
// Navigator.pop(context);
// ref.read(currentPageProvider.state).update((state) => 5);
// Navigator.pushNamed(context, changeCompanyRoute);
// },
// ),
ListTile( ListTile(
leading: Icon( leading: Icon(
Icons.logout, Icons.logout,
@@ -317,21 +266,28 @@ class CustomDrawer extends HookConsumerWidget {
ref.read(currentPageProvider.state).update((state) => 0); ref.read(currentPageProvider.state).update((state) => 0);
ref.read(logoutProvider.notifier).logout( ref.read(logoutProvider.notifier).logout(
M_UserID: selectedUser?.model.M_UserID ?? "", M_UserID: selectedUser?.model.M_UserID ?? "",
M_UserUsername: selectedUser?.model.M_UserUsername ?? "", M_UserUsername:
selectedUser?.model.M_UserUsername ?? "",
); );
}, },
), ),
],
Spacer(), ),
),
// Versi Aplikasi // Versi Aplikasi
ListTile( Padding(
title: Text( padding: EdgeInsets.only(
right: Constant.getActualXPhone(context: context, x: 20),
bottom: Constant.getActualYPhone(context: context, y: 10),
),
child: Align(
alignment: Alignment.bottomRight,
child: Text(
'Versi ${Constant.version}', 'Versi ${Constant.version}',
style: Constant.titleH4Login(context: context) style: Constant.titleH4Login(context: context)
.copyWith(color: Constant.textGrey), .copyWith(color: Constant.textGrey),
), ),
onTap: () {}, ),
), ),
], ],
), ),