From 7f57cf6b96c241047710b59ec75e1b73aad6e027 Mon Sep 17 00:00:00 2001 From: cania Date: Thu, 13 Aug 2026 16:48:34 +0200 Subject: [PATCH] Add delete icon button next to edit (with confirm dialog); swipe-to-delete keeps its confirm too --- lib/dashboard_screen.dart | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/dashboard_screen.dart b/lib/dashboard_screen.dart index 40fd0a4..1127986 100644 --- a/lib/dashboard_screen.dart +++ b/lib/dashboard_screen.dart @@ -198,10 +198,23 @@ class _DashboardScreenState extends State { title: Text(e.id, style: const TextStyle( fontWeight: FontWeight.bold)), - trailing: IconButton( - icon: const Icon(Icons.edit), - tooltip: 'Edit', - onPressed: () => _editEntry(e), + trailing: Row( + mainAxisSize: MainAxisSize.min, + children: [ + IconButton( + icon: const Icon(Icons.edit), + tooltip: 'Edit', + onPressed: () => _editEntry(e), + ), + IconButton( + icon: const Icon(Icons.delete), + tooltip: 'Hapus', + onPressed: () { + _touch(); + _deleteEntry(e); + }, + ), + ], ), children: [ Padding(