TF-1960 Highlight item menu setting when hover
(cherry picked from commit 77308841fcc3362c9111698ea216b1d8073a59ab)
This commit is contained in:
@@ -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
|
||||
)
|
||||
))
|
||||
]),
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
]),
|
||||
|
||||
+33
-29
@@ -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
|
||||
)
|
||||
))
|
||||
]),
|
||||
])
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,8 +68,8 @@ class AccountMenuItemTileBuilder extends StatelessWidget {
|
||||
return AppColor.colorBgMailboxSelected;
|
||||
} else {
|
||||
return responsiveUtils.isWebDesktop(context)
|
||||
? AppColor.colorBgDesktop
|
||||
: Colors.white;
|
||||
? Colors.transparent
|
||||
: Colors.transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
+63
-58
@@ -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
|
||||
)
|
||||
])),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user