formatted the whole codebase
This commit is contained in:
@@ -493,7 +493,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
FundTransferBeneficiaryScreen(creditAccountNo: users[selectedAccountIndex].accountNo!, remitterName: users[selectedAccountIndex].name!)));
|
||||
FundTransferBeneficiaryScreen(
|
||||
creditAccountNo:
|
||||
users[selectedAccountIndex]
|
||||
.accountNo!,
|
||||
remitterName:
|
||||
users[selectedAccountIndex]
|
||||
.name!)));
|
||||
}, disable: false),
|
||||
_buildQuickLink(
|
||||
Symbols.server_person,
|
||||
@@ -582,14 +588,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
TransactionDetailsScreen(transaction: tx),
|
||||
),
|
||||
);
|
||||
},
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) =>
|
||||
TransactionDetailsScreen(transaction: tx),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
else
|
||||
|
@@ -4,7 +4,7 @@ import '../../transactions/models/transaction.dart';
|
||||
|
||||
class TransactionListItem extends StatelessWidget {
|
||||
final Transaction transaction;
|
||||
|
||||
|
||||
const TransactionListItem({
|
||||
super.key,
|
||||
required this.transaction,
|
||||
@@ -13,7 +13,7 @@ class TransactionListItem extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool isIncome = transaction.amount > 0;
|
||||
|
||||
|
||||
return Card(
|
||||
elevation: 0,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||
@@ -25,7 +25,8 @@ class TransactionListItem extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: _getCategoryColor(transaction.category).withAlpha((0.1 * 255).toInt()),
|
||||
color: _getCategoryColor(transaction.category)
|
||||
.withAlpha((0.1 * 255).toInt()),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
@@ -34,7 +35,7 @@ class TransactionListItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
|
||||
|
||||
// Transaction details
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -48,7 +49,8 @@ class TransactionListItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
DateFormat('MMM dd, yyyy • h:mm a').format(transaction.date),
|
||||
DateFormat('MMM dd, yyyy • h:mm a')
|
||||
.format(transaction.date),
|
||||
style: TextStyle(
|
||||
color: Colors.grey[600],
|
||||
fontSize: 12,
|
||||
@@ -57,7 +59,7 @@ class TransactionListItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
// Amount
|
||||
Text(
|
||||
'${isIncome ? '+' : ''}${transaction.amount.toStringAsFixed(2)} USD',
|
||||
@@ -106,4 +108,4 @@ class TransactionListItem extends StatelessWidget {
|
||||
return Icons.category;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user