Add delete icon button next to edit (with confirm dialog); swipe-to-delete keeps its confirm too
This commit is contained in:
@@ -198,11 +198,24 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
title: Text(e.id,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold)),
|
||||
trailing: IconButton(
|
||||
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(
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
||||
Reference in New Issue
Block a user