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

@@ -1,8 +1,12 @@
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:intl/intl.dart';
import 'package:kmobile/data/models/transaction.dart';
abstract class TransactionRepository {
Future<List<Transaction>> fetchTransactions(String accountNo);
Future<List<Transaction>> fetchTransactions(String accountNo,
{DateTime? fromDate, DateTime? toDate});
}
class TransactionRepositoryImpl implements TransactionRepository {
@@ -10,9 +14,23 @@ class TransactionRepositoryImpl implements TransactionRepository {
TransactionRepositoryImpl(this._dio);
@override
Future<List<Transaction>> fetchTransactions(String accountNo) async {
Future<List<Transaction>> fetchTransactions(String accountNo,
{DateTime? fromDate, DateTime? toDate}) async {
final queryParameters = <String, String>{};
final resp = await _dio.get('/api/transactions/account/$accountNo');
if (fromDate != null) {
queryParameters['fromDate'] = DateFormat('ddMMyyyy').format(fromDate);
}
if (toDate != null) {
queryParameters['toDate'] = DateFormat('ddMMyyyy').format(toDate);
}
log('query params below');
log(queryParameters.toString());
final resp = await _dio.get(
'/api/transactions/account/$accountNo',
queryParameters: queryParameters.isNotEmpty ? queryParameters : null,
);
if (resp.statusCode != 200) {
throw Exception(
@@ -25,4 +43,4 @@ class TransactionRepositoryImpl implements TransactionRepository {
.map((e) => Transaction.fromJson(e as Map<String, dynamic>))
.toList();
}
}
}