feat: Implement major features and fix theming bug

This commit introduces several new features and a critical bug fix.

- Implemented a full "Quick Pay" flow for both within and outside the bank, including IFSC validation, beneficiary verification, and a TPIN-based payment process.
- Added a date range filter to the Account Statement screen and streamlined the UI by removing the amount filters.
- Fixed a major bug that prevented dynamic theme changes from being applied. The app now correctly switches between color themes.
- Refactored and improved beneficiary management, transaction models, and the fund transfer flow to support NEFT/RTGS.
This commit is contained in:
asif
2025-08-11 04:06:05 +05:30
parent 3024ddef15
commit f91d0f739b
34 changed files with 1638 additions and 911 deletions

View File

@@ -36,7 +36,11 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
});
try {
final repo = getIt<TransactionRepository>();
final txs = await repo.fetchTransactions(widget.accountNo);
final txs = await repo.fetchTransactions(
widget.accountNo,
fromDate: fromDate,
toDate: toDate,
);
setState(() => _transactions = txs);
} catch (e) {
if (!mounted) return;
@@ -115,7 +119,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
),
title: Text(
AppLocalizations.of(context).accountStatement,
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
actions: [
@@ -181,56 +186,28 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
],
),
const SizedBox(height: 20),
Row(
children: [
Expanded(
child: TextFormField(
controller: _minAmountController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context).minAmount,
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Theme.of(context).scaffoldBackgroundColor,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: _loadTransactions,
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
padding: const EdgeInsets.symmetric(vertical: 16),
),
child: Text(
"Search",
style: TextStyle(
color: Theme.of(context).scaffoldBackgroundColor,
fontSize: 16,
),
),
const SizedBox(width: 8),
Expanded(
child: TextFormField(
controller: _maxAmountController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context).maxAmount,
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Theme.of(context).scaffoldBackgroundColor,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.done,
),
),
const SizedBox(width: 8),
SizedBox(
width: 70,
child: ElevatedButton(
onPressed: _loadTransactions,
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
),
child: Icon(
Symbols.arrow_forward,
color: Theme.of(context).scaffoldBackgroundColor,
size: 30,
),
),
),
],
),
),
const SizedBox(height: 35),
if (!_txLoading && _transactions.isNotEmpty)
if (!_txLoading &&
_transactions.isNotEmpty &&
fromDate == null &&
toDate == null)
Padding(
padding: const EdgeInsets.only(bottom: 12.0),
child: Text(
@@ -252,7 +229,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
highlightColor: Colors.grey[100]!,
child: CircleAvatar(
radius: 12,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
backgroundColor:
Theme.of(context).scaffoldBackgroundColor,
),
),
title: Shimmer.fromColors(
@@ -298,7 +276,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
title: Text(
tx.name != null
? (tx.name!.length > 18
? tx.name!.substring(0, 20)
? tx.name!.substring(0, 22)
: tx.name!)
: '',
style: const TextStyle(fontSize: 14),