diff --git a/lib/view/expense/expense_screen.dart b/lib/view/expense/expense_screen.dart index ac8b396..9c0ce3f 100644 --- a/lib/view/expense/expense_screen.dart +++ b/lib/view/expense/expense_screen.dart @@ -488,53 +488,57 @@ class _ExpenseList extends StatelessWidget { format: 'dd MMM yyyy, hh:mm a', ); - return GestureDetector( - onTap: () async { - final result = await Get.to( - () => ExpenseDetailScreen(expenseId: expense.id), - arguments: {'expense': expense}, - ); - if (result == true && onViewDetail != null) { - await onViewDetail!(); - } - }, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - MyText.bodyMedium(expense.expensesType.name, - fontWeight: 600), - Row( - children: [ - MyText.bodyMedium( - '₹ ${expense.amount.toStringAsFixed(2)}', - fontWeight: 600), - if (expense.status.name.toLowerCase() == 'draft') ...[ - const SizedBox(width: 8), - GestureDetector( - onTap: () => - _showDeleteConfirmation(context, expense), - child: const Icon(Icons.delete, - color: Colors.red, size: 20), - ), + return Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(8), + onTap: () async { + final result = await Get.to( + () => ExpenseDetailScreen(expenseId: expense.id), + arguments: {'expense': expense}, + ); + if (result == true && onViewDetail != null) { + await onViewDetail!(); + } + }, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + MyText.bodyMedium(expense.expensesType.name, + fontWeight: 600), + Row( + children: [ + MyText.bodyMedium( + '₹ ${expense.amount.toStringAsFixed(2)}', + fontWeight: 600), + if (expense.status.name.toLowerCase() == 'draft') ...[ + const SizedBox(width: 8), + GestureDetector( + onTap: () => + _showDeleteConfirmation(context, expense), + child: const Icon(Icons.delete, + color: Colors.red, size: 20), + ), + ], ], - ], - ), - ], - ), - const SizedBox(height: 6), - Row( - children: [ - MyText.bodySmall(formattedDate, fontWeight: 500), - const Spacer(), - MyText.bodySmall(expense.status.name, fontWeight: 500), - ], - ), - ], + ), + ], + ), + const SizedBox(height: 6), + Row( + children: [ + MyText.bodySmall(formattedDate, fontWeight: 500), + const Spacer(), + MyText.bodySmall(expense.status.name, fontWeight: 500), + ], + ), + ], + ), ), ), );