Skip to content

Commit

Permalink
TF-1960 Highlight item menu setting when hover
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Jul 7, 2023
1 parent c3101d1 commit 7730884
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,26 +114,33 @@ class ManageAccountMenuView extends GetWidget<ManageAccountMenuController> {
padding: EdgeInsets.symmetric(vertical: 16),
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
Padding(
padding: const EdgeInsetsDirectional.only(start: 32),
child: InkWell(
onTap: () {
controller.dashBoardController.logout(
controller.dashBoardController.sessionCurrent,
controller.dashBoardController.accountId.value
);
},
child: Row(children: [
SvgPicture.asset(_imagePaths.icSignOut, fit: BoxFit.fill),
const SizedBox(width: 12),
Expanded(child: Text(
AppLocalizations.of(context).sign_out,
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: 15,
color: Colors.black
)
))
])
padding: const EdgeInsetsDirectional.only(start: 20, end: 10),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
controller.dashBoardController.logout(
controller.dashBoardController.sessionCurrent,
controller.dashBoardController.accountId.value
);
},
borderRadius: BorderRadius.circular(10),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
child: Row(children: [
SvgPicture.asset(_imagePaths.icSignOut, fit: BoxFit.fill),
const SizedBox(width: 12),
Expanded(child: Text(
AppLocalizations.of(context).sign_out,
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: 15,
color: Colors.black
)
))
]),
)
),
)
),
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,38 @@ class AccountMenuItemTileBuilder extends StatelessWidget {
final imagePaths = Get.find<ImagePaths>();

return Padding(
key: const Key('account_menu_item_tile'),
padding: const EdgeInsets.only(top: 6),
child: InkWell(
onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
child: Container(
key: const Key('account_menu_item_tile'),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: _getBackgroundColorItem(context)),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
child: Column(children: [
Row(children: [
SvgPicture.asset(
_menuItem.getIcon(imagePaths),
width: 20,
height: 20,
fit: BoxFit.fill),
const SizedBox(width: 12),
Expanded(child: Text(
_menuItem.getName(context),
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: 15,
color: Colors.black
)
))
]),
])
)),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
borderRadius: BorderRadius.circular(10),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: _getBackgroundColorItem(context)),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
child: Column(children: [
Row(children: [
SvgPicture.asset(
_menuItem.getIcon(imagePaths),
width: 20,
height: 20,
fit: BoxFit.fill),
const SizedBox(width: 12),
Expanded(child: Text(
_menuItem.getName(context),
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: 15,
color: Colors.black
)
))
]),
])
)),
),
);
}

Expand All @@ -64,8 +68,8 @@ class AccountMenuItemTileBuilder extends StatelessWidget {
return AppColor.colorBgMailboxSelected;
} else {
return responsiveUtils.isWebDesktop(context)
? AppColor.colorBgDesktop
: Colors.white;
? Colors.transparent
: Colors.transparent;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,66 +32,71 @@ class SettingFirstLevelTileBuilder extends StatelessWidget {

@override
Widget build(BuildContext context) {
return InkWell(onTap: clickAction,child: Padding(
padding: const EdgeInsets.only(top: 24, bottom: 24),
child: Row(
children: [
Expanded(flex: 9, child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
return Material(
color: Colors.transparent,
child: InkWell(
onTap: clickAction,
child: Padding(
padding: const EdgeInsetsDirectional.symmetric(vertical: 24),
child: Row(
children: [
Row(
Expanded(flex: 9, child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
right: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
left: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
),
child: _buildSettingIcon(context)),
Expanded(child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12),
child: Text(
title,
maxLines: 1,
softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow,
style: const TextStyle(
fontSize: 16,
color: AppColor.colorNameEmail,
fontWeight: FontWeight.w400,
)
)
))
],
),
subtitle != null
? Padding(
padding: EdgeInsets.only(
left: AppUtils.isDirectionRTL(context) ? 12 : _getSubtitleLeftPadding(context),
right: AppUtils.isDirectionRTL(context) ? _getSubtitleLeftPadding(context) : 12,
top: 12
),
child: Text(
subtitle!,
style: const TextStyle(
fontSize: 13,
color: AppColor.colorContentEmail,
fontWeight: FontWeight.w400)))
: const SizedBox.shrink()
]
)),
IconButton(
padding: EdgeInsets.only(
right: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
left: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
),
icon: SvgPicture.asset(
DirectionUtils.isDirectionRTLByLanguage(context) ? _imagePath.icBack : _imagePath.icCollapseFolder,
fit: BoxFit.fill,
colorFilter: AppColor.colorCollapseMailbox.asFilter()),
onPressed: clickAction
)
])),
Row(
children: [
Padding(
padding: EdgeInsets.only(
right: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
left: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
),
child: _buildSettingIcon(context)),
Expanded(child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12),
child: Text(
title,
maxLines: 1,
softWrap: CommonTextStyle.defaultSoftWrap,
overflow: CommonTextStyle.defaultTextOverFlow,
style: const TextStyle(
fontSize: 16,
color: AppColor.colorNameEmail,
fontWeight: FontWeight.w400,
)
)
))
],
),
subtitle != null
? Padding(
padding: EdgeInsets.only(
left: AppUtils.isDirectionRTL(context) ? 12 : _getSubtitleLeftPadding(context),
right: AppUtils.isDirectionRTL(context) ? _getSubtitleLeftPadding(context) : 12,
top: 12
),
child: Text(
subtitle!,
style: const TextStyle(
fontSize: 13,
color: AppColor.colorContentEmail,
fontWeight: FontWeight.w400)))
: const SizedBox.shrink()
]
)),
IconButton(
padding: EdgeInsets.only(
right: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
left: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
),
icon: SvgPicture.asset(
DirectionUtils.isDirectionRTLByLanguage(context) ? _imagePath.icBack : _imagePath.icCollapseFolder,
fit: BoxFit.fill,
colorFilter: AppColor.colorCollapseMailbox.asFilter()),
onPressed: clickAction
)
])),
),
);
}

Expand Down

0 comments on commit 7730884

Please sign in to comment.