Language Changes

This commit is contained in:
Nilanjan Chakrabarti
2025-07-09 12:46:51 +05:30
commit 5e72baf1d3
458 changed files with 52259 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
import 'package:flutter/material.dart';
import '../../accounts/models/account.dart';
class AccountCard extends StatelessWidget {
final Account account;
const AccountCard({
super.key,
required this.account,
});
@override
Widget build(BuildContext context) {
return Container(
width: 300,
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Theme.of(context).primaryColor,
Theme.of(context).primaryColor.withBlue(200),
],
),
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.grey.withAlpha((0.1 * 255).toInt()),
spreadRadius: 1,
blurRadius: 5,
offset: const Offset(0, 3),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
account.accountType,
style: const TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
Icon(
account.accountType == 'Savings'
? Icons.savings
: Icons.account_balance,
color: Colors.white,
),
],
),
const SizedBox(height: 20),
Text(
account.accountNumber,
style: const TextStyle(
color: Colors.white70,
fontSize: 16,
),
),
const SizedBox(height: 30),
Text(
'${account.currency} ${account.balance.toStringAsFixed(2)}',
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 5),
const Text(
'Available Balance',
style: TextStyle(
color: Colors.white70,
fontSize: 12,
),
),
],
),
);
}
}

View File

@@ -0,0 +1,109 @@
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import '../../transactions/models/transaction.dart';
class TransactionListItem extends StatelessWidget {
final Transaction transaction;
const TransactionListItem({
super.key,
required this.transaction,
});
@override
Widget build(BuildContext context) {
final bool isIncome = transaction.amount > 0;
return Card(
elevation: 0,
margin: const EdgeInsets.symmetric(vertical: 8),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
children: [
// Category icon
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: _getCategoryColor(transaction.category).withAlpha((0.1 * 255).toInt()),
borderRadius: BorderRadius.circular(8),
),
child: Icon(
_getCategoryIcon(transaction.category),
color: _getCategoryColor(transaction.category),
),
),
const SizedBox(width: 12),
// Transaction details
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
transaction.description,
style: const TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
),
),
Text(
DateFormat('MMM dd, yyyy • h:mm a').format(transaction.date),
style: TextStyle(
color: Colors.grey[600],
fontSize: 12,
),
),
],
),
),
// Amount
Text(
'${isIncome ? '+' : ''}${transaction.amount.toStringAsFixed(2)} USD',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: isIncome ? Colors.green : Colors.red,
),
),
],
),
),
);
}
Color _getCategoryColor(String category) {
switch (category.toLowerCase()) {
case 'food & drink':
return Colors.orange;
case 'shopping':
return Colors.purple;
case 'transportation':
return Colors.blue;
case 'utilities':
return Colors.red;
case 'income':
return Colors.green;
default:
return Colors.grey;
}
}
IconData _getCategoryIcon(String category) {
switch (category.toLowerCase()) {
case 'food & drink':
return Icons.restaurant;
case 'shopping':
return Icons.shopping_bag;
case 'transportation':
return Icons.directions_car;
case 'utilities':
return Icons.power;
case 'income':
return Icons.attach_money;
default:
return Icons.category;
}
}
}

View File

@@ -0,0 +1,61 @@
import 'package:flutter/material.dart';
class EmptyTransactionsPlaceholder extends StatelessWidget {
const EmptyTransactionsPlaceholder({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: List.generate(5, (index) {
return Container(
margin: const EdgeInsets.symmetric(vertical: 8),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(12),
),
child: Row(
children: [
// Placeholder for icon
Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(8),
),
),
const SizedBox(width: 16),
// Placeholder for transaction details
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 120,
height: 14,
color: Colors.grey[350],
),
const SizedBox(height: 8),
Container(
width: 80,
height: 10,
color: Colors.grey[300],
),
],
),
),
const SizedBox(width: 16),
// Placeholder for amount
Container(
width: 60,
height: 16,
color: Colors.grey[350],
),
],
),
);
}),
);
}
}