resolved the not opening detail screen o tap of non content

This commit is contained in:
Vaibhav Surve 2025-08-05 10:14:43 +05:30
parent 7dbc9138c6
commit 84811635d0

View File

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