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

@@ -475,4 +475,3 @@ class BiometricPromptScreen extends StatelessWidget {
}
}
}

View File

@@ -14,6 +14,3 @@ class RtgsResponse {
);
}
}

View File

@@ -174,11 +174,12 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
print(e.toString());
final error = jsonDecode(e.response.toString())['error'];
var errorMessage =
{
var errorMessage = {
"INCORRECT_TPIN": "Please Enter the correct TPIN",
"INSUFFICIENT_FUNDS": "Your account does not have sufficient balance"
}[error] ?? "Something Went Wrong";
"INSUFFICIENT_FUNDS":
"Your account does not have sufficient balance"
}[error] ??
"Something Went Wrong";
final paymentResponse = PaymentResponse(
isSuccess: false,
@@ -194,8 +195,7 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
);
completer.complete(paymentResponse);
}
}
else {
} else {
final rtgsTx = RtgsTransaction(
fromAccount: widget.debitAccountNo,
toAccount: widget.creditBeneficiary.accountNo,
@@ -331,7 +331,6 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
_selectedMode == TransactionMode.neft,
_selectedMode == TransactionMode.rtgs,
_selectedMode == TransactionMode.imps,
],
onPressed: (index) {
setState(() {
@@ -359,7 +358,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
child: Text(AppLocalizations.of(context).rtgs),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
padding: const EdgeInsets.symmetric(
horizontal: 24.0, vertical: 12.0),
child: Text(AppLocalizations.of(context).imps),
),
],

View File

@@ -7,7 +7,12 @@ class Branch {
final String ifsc;
final String address;
Branch({required this.name, required this.code, required this.ifsc, required this.address,});
Branch({
required this.name,
required this.code,
required this.ifsc,
required this.address,
});
}
class BranchLocatorScreen extends StatefulWidget {
@@ -22,8 +27,16 @@ final TextEditingController _searchController = TextEditingController();
// Static list of 5 branches
final List<Branch> _branches = [
Branch(name: "Dharamsala - Head Office", code: "002", ifsc: "KACE0000002", address: "Civil Lines Dharmashala, Kangra, HP - 176215"),
Branch(name: "Kangra", code: "033", ifsc: "KACE0000033", address: "Rajput Bhawankangrapo Kangra, Kangra, HP "),
Branch(
name: "Dharamsala - Head Office",
code: "002",
ifsc: "KACE0000002",
address: "Civil Lines Dharmashala, Kangra, HP - 176215"),
Branch(
name: "Kangra",
code: "033",
ifsc: "KACE0000033",
address: "Rajput Bhawankangrapo Kangra, Kangra, HP "),
];
List<Branch> _filteredBranches = [];
@@ -50,8 +63,6 @@ branch.address.toLowerCase().contains(lowerQuery);
});
}
// @override
// Widget build(BuildContext context) {
// return Scaffold(
@@ -124,14 +135,20 @@ itemCount: _filteredBranches.length,
itemBuilder: (context, index) {
final branch = _filteredBranches[index];
return Card(
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
margin: const EdgeInsets.symmetric(
horizontal: 12, vertical: 6),
child: ListTile(
leading: Icon(Icons.location_city, color: Theme.of(context).primaryColor),
title: Text(branch.name, style: const TextStyle(fontWeight: FontWeight.bold)),
subtitle: Text("Code: ${branch.code} | IFSC: ${branch.ifsc} \nBranch Address: ${branch.address}"),
leading: Icon(Icons.location_city,
color: Theme.of(context).primaryColor),
title: Text(branch.name,
style:
const TextStyle(fontWeight: FontWeight.bold)),
subtitle: Text(
"Code: ${branch.code} | IFSC: ${branch.ifsc} \nBranch Address: ${branch.address}"),
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Selected ${branch.name}")),
SnackBar(
content: Text("Selected ${branch.name}")),
);
},
),
@@ -144,5 +161,3 @@ SnackBar(content: Text("Selected ${branch.name}")),
);
}
}

View File

@@ -76,8 +76,7 @@ class _ServiceScreen extends State<ServiceScreen> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const BranchLocatorScreen())
);
builder: (context) => const BranchLocatorScreen()));
},
),
const Divider(height: 1),

View File

@@ -71,8 +71,7 @@ Widget getBankLogo(String? bankName) {
width: 40,
height: 40,
);
}
else {
} else {
return const Icon(
Icons.account_balance,
size: 40,