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),
|
padding: EdgeInsets.symmetric(vertical: 16),
|
||||||
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.only(start: 32),
|
padding: const EdgeInsetsDirectional.only(start: 20, end: 10),
|
||||||
child: InkWell(
|
child: Material(
|
||||||
onTap: () {
|
color: Colors.transparent,
|
||||||
controller.dashBoardController.logout(
|
child: InkWell(
|
||||||
controller.dashBoardController.sessionCurrent,
|
onTap: () {
|
||||||
controller.dashBoardController.accountId.value
|
controller.dashBoardController.logout(
|
||||||
);
|
controller.dashBoardController.sessionCurrent,
|
||||||
},
|
controller.dashBoardController.accountId.value
|
||||||
child: Row(children: [
|
);
|
||||||
SvgPicture.asset(_imagePaths.icSignOut, fit: BoxFit.fill),
|
},
|
||||||
const SizedBox(width: 12),
|
borderRadius: BorderRadius.circular(10),
|
||||||
Expanded(child: Text(
|
child: Padding(
|
||||||
AppLocalizations.of(context).sign_out,
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
style: const TextStyle(
|
child: Row(children: [
|
||||||
fontWeight: FontWeight.normal,
|
SvgPicture.asset(_imagePaths.icSignOut, fit: BoxFit.fill),
|
||||||
fontSize: 15,
|
const SizedBox(width: 12),
|
||||||
color: Colors.black
|
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>();
|
final imagePaths = Get.find<ImagePaths>();
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
|
key: const Key('account_menu_item_tile'),
|
||||||
padding: const EdgeInsets.only(top: 6),
|
padding: const EdgeInsets.only(top: 6),
|
||||||
child: InkWell(
|
child: Material(
|
||||||
onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
|
color: Colors.transparent,
|
||||||
child: Container(
|
child: InkWell(
|
||||||
key: const Key('account_menu_item_tile'),
|
onTap: () => onSelectAccountMenuItemAction?.call(_menuItem),
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.circular(10),
|
||||||
borderRadius: BorderRadius.circular(10),
|
child: Container(
|
||||||
color: _getBackgroundColorItem(context)),
|
decoration: BoxDecoration(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: Column(children: [
|
color: _getBackgroundColorItem(context)),
|
||||||
Row(children: [
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||||
SvgPicture.asset(
|
child: Column(children: [
|
||||||
_menuItem.getIcon(imagePaths),
|
Row(children: [
|
||||||
width: 20,
|
SvgPicture.asset(
|
||||||
height: 20,
|
_menuItem.getIcon(imagePaths),
|
||||||
fit: BoxFit.fill),
|
width: 20,
|
||||||
const SizedBox(width: 12),
|
height: 20,
|
||||||
Expanded(child: Text(
|
fit: BoxFit.fill),
|
||||||
_menuItem.getName(context),
|
const SizedBox(width: 12),
|
||||||
style: const TextStyle(
|
Expanded(child: Text(
|
||||||
fontWeight: FontWeight.normal,
|
_menuItem.getName(context),
|
||||||
fontSize: 15,
|
style: const TextStyle(
|
||||||
color: Colors.black
|
fontWeight: FontWeight.normal,
|
||||||
)
|
fontSize: 15,
|
||||||
))
|
color: Colors.black
|
||||||
]),
|
)
|
||||||
])
|
))
|
||||||
)),
|
]),
|
||||||
|
])
|
||||||
|
)),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,8 +68,8 @@ class AccountMenuItemTileBuilder extends StatelessWidget {
|
|||||||
return AppColor.colorBgMailboxSelected;
|
return AppColor.colorBgMailboxSelected;
|
||||||
} else {
|
} else {
|
||||||
return responsiveUtils.isWebDesktop(context)
|
return responsiveUtils.isWebDesktop(context)
|
||||||
? AppColor.colorBgDesktop
|
? Colors.transparent
|
||||||
: Colors.white;
|
: Colors.transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+63
-58
@@ -32,66 +32,71 @@ class SettingFirstLevelTileBuilder extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(onTap: clickAction,child: Padding(
|
return Material(
|
||||||
padding: const EdgeInsets.only(top: 24, bottom: 24),
|
color: Colors.transparent,
|
||||||
child: Row(
|
child: InkWell(
|
||||||
children: [
|
onTap: clickAction,
|
||||||
Expanded(flex: 9, child: Column(
|
child: Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
padding: const EdgeInsetsDirectional.symmetric(vertical: 24),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Expanded(flex: 9, child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Row(
|
||||||
padding: EdgeInsets.only(
|
children: [
|
||||||
right: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
|
Padding(
|
||||||
left: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
|
padding: EdgeInsets.only(
|
||||||
),
|
right: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
|
||||||
child: _buildSettingIcon(context)),
|
left: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
|
||||||
Expanded(child: Padding(
|
),
|
||||||
padding: const EdgeInsets.only(left: 12, right: 12),
|
child: _buildSettingIcon(context)),
|
||||||
child: Text(
|
Expanded(child: Padding(
|
||||||
title,
|
padding: const EdgeInsets.only(left: 12, right: 12),
|
||||||
maxLines: 1,
|
child: Text(
|
||||||
softWrap: CommonTextStyle.defaultSoftWrap,
|
title,
|
||||||
overflow: CommonTextStyle.defaultTextOverFlow,
|
maxLines: 1,
|
||||||
style: const TextStyle(
|
softWrap: CommonTextStyle.defaultSoftWrap,
|
||||||
fontSize: 16,
|
overflow: CommonTextStyle.defaultTextOverFlow,
|
||||||
color: AppColor.colorNameEmail,
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w400,
|
fontSize: 16,
|
||||||
)
|
color: AppColor.colorNameEmail,
|
||||||
)
|
fontWeight: FontWeight.w400,
|
||||||
))
|
)
|
||||||
],
|
)
|
||||||
),
|
))
|
||||||
subtitle != null
|
],
|
||||||
? Padding(
|
),
|
||||||
padding: EdgeInsets.only(
|
subtitle != null
|
||||||
left: AppUtils.isDirectionRTL(context) ? 12 : _getSubtitleLeftPadding(context),
|
? Padding(
|
||||||
right: AppUtils.isDirectionRTL(context) ? _getSubtitleLeftPadding(context) : 12,
|
padding: EdgeInsets.only(
|
||||||
top: 12
|
left: AppUtils.isDirectionRTL(context) ? 12 : _getSubtitleLeftPadding(context),
|
||||||
),
|
right: AppUtils.isDirectionRTL(context) ? _getSubtitleLeftPadding(context) : 12,
|
||||||
child: Text(
|
top: 12
|
||||||
subtitle!,
|
),
|
||||||
style: const TextStyle(
|
child: Text(
|
||||||
fontSize: 13,
|
subtitle!,
|
||||||
color: AppColor.colorContentEmail,
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w400)))
|
fontSize: 13,
|
||||||
: const SizedBox.shrink()
|
color: AppColor.colorContentEmail,
|
||||||
]
|
fontWeight: FontWeight.w400)))
|
||||||
)),
|
: const SizedBox.shrink()
|
||||||
IconButton(
|
]
|
||||||
padding: EdgeInsets.only(
|
)),
|
||||||
right: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
|
IconButton(
|
||||||
left: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
|
padding: EdgeInsets.only(
|
||||||
),
|
right: AppUtils.isDirectionRTL(context) ? 0 : SettingsUtils.getHorizontalPadding(context, _responsiveUtils),
|
||||||
icon: SvgPicture.asset(
|
left: AppUtils.isDirectionRTL(context) ? SettingsUtils.getHorizontalPadding(context, _responsiveUtils) : 0,
|
||||||
DirectionUtils.isDirectionRTLByLanguage(context) ? _imagePath.icBack : _imagePath.icCollapseFolder,
|
),
|
||||||
fit: BoxFit.fill,
|
icon: SvgPicture.asset(
|
||||||
colorFilter: AppColor.colorCollapseMailbox.asFilter()),
|
DirectionUtils.isDirectionRTLByLanguage(context) ? _imagePath.icBack : _imagePath.icCollapseFolder,
|
||||||
onPressed: clickAction
|
fit: BoxFit.fill,
|
||||||
)
|
colorFilter: AppColor.colorCollapseMailbox.asFilter()),
|
||||||
])),
|
onPressed: clickAction
|
||||||
|
)
|
||||||
|
])),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user