formatted some files

This commit is contained in:
asif
2025-08-23 23:51:53 +05:30
parent 5f41c6e7f4
commit 59eb509dda
8 changed files with 125 additions and 116 deletions

View File

@@ -135,9 +135,9 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
completer.complete(paymentResponse);
}
}
//IMPS transaction
else if (_selectedMode == TransactionMode.imps){
//IMPS transaction
else if (_selectedMode == TransactionMode.imps) {
final impsTx = ImpsTransaction(
fromAccount: widget.debitAccountNo,
toAccount: widget.creditBeneficiary.accountNo,
@@ -169,18 +169,19 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
utr: impsResponse.utr,
);
completer.complete(paymentResponse);
} on DioException catch(e) {
} on DioException catch (e) {
print('dio exception');
print(e.toString());
final error = jsonDecode(e.response.toString())['error'];
var errorMessage =
{
"INCORRECT_TPIN" : "Please Enter the correct TPIN",
"INSUFFICIENT_FUNDS": "Your account does not have sufficient balance"
}[error] ?? "Something Went Wrong";
var errorMessage = {
"INCORRECT_TPIN": "Please Enter the correct TPIN",
"INSUFFICIENT_FUNDS":
"Your account does not have sufficient balance"
}[error] ??
"Something Went Wrong";
final paymentResponse = PaymentResponse(
final paymentResponse = PaymentResponse(
isSuccess: false,
errorMessage: errorMessage,
);
@@ -194,8 +195,7 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
);
completer.complete(paymentResponse);
}
}
else {
} else {
final rtgsTx = RtgsTransaction(
fromAccount: widget.debitAccountNo,
toAccount: widget.creditBeneficiary.accountNo,
@@ -329,9 +329,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
child: ToggleButtons(
isSelected: [
_selectedMode == TransactionMode.neft,
_selectedMode == TransactionMode.rtgs,
_selectedMode == TransactionMode.rtgs,
_selectedMode == TransactionMode.imps,
],
onPressed: (index) {
setState(() {
@@ -358,8 +357,9 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
horizontal: 24.0, vertical: 12.0),
child: Text(AppLocalizations.of(context).rtgs),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24.0, vertical: 12.0),
child: Text(AppLocalizations.of(context).imps),
),
],