feat(chat): inline action panel with context menu edit flow

This commit is contained in:
cogwheel0
2025-10-24 00:31:29 +05:30
parent c1eae6608d
commit 9c2cf347a7
2 changed files with 141 additions and 80 deletions

View File

@@ -54,31 +54,33 @@ Future<void> showConduitContextMenu({
overlay.size.height - menuPosition.dy,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppBorderRadius.md),
borderRadius: BorderRadius.circular(AppBorderRadius.small),
),
color: theme.surfaceBackground,
elevation: 8,
elevation: 4,
items: actions.map((action) {
return PopupMenuItem<ConduitContextMenuAction>(
value: action,
padding: const EdgeInsets.symmetric(
horizontal: Spacing.md,
vertical: Spacing.xs,
horizontal: Spacing.sm,
vertical: Spacing.xxs,
),
height: 36,
child: Row(
children: [
Icon(
Platform.isIOS ? action.cupertinoIcon : action.materialIcon,
color: action.destructive ? Colors.red : theme.iconPrimary,
size: IconSize.sm,
size: IconSize.xs,
),
const SizedBox(width: Spacing.md),
const SizedBox(width: Spacing.sm),
Expanded(
child: Text(
action.label,
style: AppTypography.standard.copyWith(
color: action.destructive ? Colors.red : theme.textPrimary,
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
),