Set mouse cursor click when select item email

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit bb10b4304909c46c47a00ec4bc6cdcf7af268211)
This commit is contained in:
dab246
2023-12-19 19:04:10 +07:00
committed by Dat H. Pham
parent ba83b319b8
commit 293c58b239
@@ -70,16 +70,19 @@ class _EmailTileBuilderState extends State<EmailTileBuilder> with BaseEmailItem
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: () => widget.emailActionClick?.call(
widget.selectAllMode == SelectMode.ACTIVE
? EmailActionType.selection
: EmailActionType.preview,
widget.presentationEmail
),
child: Padding(
padding: const EdgeInsetsDirectional.only(top: 8, end: 12),
child: _buildAvatarIcon(context: context),
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () => widget.emailActionClick?.call(
widget.selectAllMode == SelectMode.ACTIVE
? EmailActionType.selection
: EmailActionType.preview,
widget.presentationEmail
),
child: Padding(
padding: const EdgeInsetsDirectional.only(top: 8, end: 12),
child: _buildAvatarIcon(context: context),
),
),
),
Expanded(
@@ -192,23 +195,26 @@ class _EmailTileBuilderState extends State<EmailTileBuilder> with BaseEmailItem
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GestureDetector(
onTap: () => widget.emailActionClick?.call(
EmailActionType.selection,
widget.presentationEmail
),
child: Padding(
padding: const EdgeInsetsDirectional.only(top: 8, end: 12),
child: ValueListenableBuilder(
valueListenable: _hoverNotifier,
builder: (context, value, child) {
return _buildAvatarIcon(
context: context,
isHovered: value
);
}
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () => widget.emailActionClick?.call(
EmailActionType.selection,
widget.presentationEmail
),
child: Padding(
padding: const EdgeInsetsDirectional.only(top: 8, end: 12),
child: ValueListenableBuilder(
valueListenable: _hoverNotifier,
builder: (context, value, child) {
return _buildAvatarIcon(
context: context,
isHovered: value
);
}
)
)
)
),
),
Expanded(child: Column(children: [
Row(children: [
@@ -368,25 +374,28 @@ class _EmailTileBuilderState extends State<EmailTileBuilder> with BaseEmailItem
iconPadding: const EdgeInsetsDirectional.only(end: 12),
splashRadius: 1
),
GestureDetector(
onTap: () => widget.emailActionClick?.call(
EmailActionType.selection,
widget.presentationEmail
),
child: ValueListenableBuilder(
valueListenable: _hoverNotifier,
builder: (context, value, child) {
return _buildAvatarIcon(
context: context,
isHovered: value,
iconSize: 32,
textStyle: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.white
)
);
}
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () => widget.emailActionClick?.call(
EmailActionType.selection,
widget.presentationEmail
),
child: ValueListenableBuilder(
valueListenable: _hoverNotifier,
builder: (context, value, child) {
return _buildAvatarIcon(
context: context,
isHovered: value,
iconSize: 32,
textStyle: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Colors.white
)
);
}
),
),
),
const SizedBox(width: 10),