TF-3759 Update style popup context menu for search email view
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -79,7 +79,7 @@ mixin PopupContextMenuActionMixin {
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||
),
|
||||
constraints: const BoxConstraints(maxWidth: 220),
|
||||
constraints: const BoxConstraints(maxWidth: 300),
|
||||
items: popupMenuItems,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,11 +14,6 @@ abstract class PopupMenuItemAction<T> with EquatableMixin {
|
||||
|
||||
String get actionName;
|
||||
|
||||
String getActionNameWithLimitation({int limitCharacters = 22}) =>
|
||||
actionName.length > limitCharacters
|
||||
? '${actionName.substring(0, limitCharacters)}...'
|
||||
: actionName;
|
||||
|
||||
Color get actionNameColor => Colors.black;
|
||||
|
||||
void onClick(OnPopupMenuActionClick callback) => callback(this);
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
import 'package:tmail_ui_user/features/base/model/popup_menu_item_action.dart';
|
||||
|
||||
class PopupMenuItemActionWidget extends StatelessWidget {
|
||||
@@ -32,27 +33,30 @@ class PopupMenuItemActionWidget extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
onTap: () => menuAction.onClick(menuActionClick),
|
||||
child: Container(
|
||||
height: 48,
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
if (iconWidget != null) iconWidget,
|
||||
Expanded(
|
||||
child: Text(
|
||||
menuAction.getActionNameWithLimitation(),
|
||||
style: ThemeUtils.textStyleBodyBody3(
|
||||
color: menuAction.actionNameColor,
|
||||
return PointerInterceptor(
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
onTap: () => menuAction.onClick(menuActionClick),
|
||||
child: Container(
|
||||
height: 48,
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
if (iconWidget != null) iconWidget,
|
||||
Expanded(
|
||||
child: Text(
|
||||
menuAction.actionName,
|
||||
style: ThemeUtils.textStyleBodyBody3(
|
||||
color: menuAction.actionNameColor,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user