formatted some files
This commit is contained in:
@@ -475,4 +475,3 @@ class BiometricPromptScreen extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,6 +14,3 @@ class RtgsResponse {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -174,11 +174,12 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
print(e.toString());
|
print(e.toString());
|
||||||
|
|
||||||
final error = jsonDecode(e.response.toString())['error'];
|
final error = jsonDecode(e.response.toString())['error'];
|
||||||
var errorMessage =
|
var errorMessage = {
|
||||||
{
|
|
||||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||||
"INSUFFICIENT_FUNDS": "Your account does not have sufficient balance"
|
"INSUFFICIENT_FUNDS":
|
||||||
}[error] ?? "Something Went Wrong";
|
"Your account does not have sufficient balance"
|
||||||
|
}[error] ??
|
||||||
|
"Something Went Wrong";
|
||||||
|
|
||||||
final paymentResponse = PaymentResponse(
|
final paymentResponse = PaymentResponse(
|
||||||
isSuccess: false,
|
isSuccess: false,
|
||||||
@@ -194,8 +195,7 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
);
|
);
|
||||||
completer.complete(paymentResponse);
|
completer.complete(paymentResponse);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
final rtgsTx = RtgsTransaction(
|
final rtgsTx = RtgsTransaction(
|
||||||
fromAccount: widget.debitAccountNo,
|
fromAccount: widget.debitAccountNo,
|
||||||
toAccount: widget.creditBeneficiary.accountNo,
|
toAccount: widget.creditBeneficiary.accountNo,
|
||||||
@@ -331,7 +331,6 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
_selectedMode == TransactionMode.neft,
|
_selectedMode == TransactionMode.neft,
|
||||||
_selectedMode == TransactionMode.rtgs,
|
_selectedMode == TransactionMode.rtgs,
|
||||||
_selectedMode == TransactionMode.imps,
|
_selectedMode == TransactionMode.imps,
|
||||||
|
|
||||||
],
|
],
|
||||||
onPressed: (index) {
|
onPressed: (index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -359,7 +358,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
|||||||
child: Text(AppLocalizations.of(context).rtgs),
|
child: Text(AppLocalizations.of(context).rtgs),
|
||||||
),
|
),
|
||||||
Padding(
|
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),
|
child: Text(AppLocalizations.of(context).imps),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@@ -7,7 +7,12 @@ class Branch {
|
|||||||
final String ifsc;
|
final String ifsc;
|
||||||
final String address;
|
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 {
|
class BranchLocatorScreen extends StatefulWidget {
|
||||||
@@ -22,8 +27,16 @@ final TextEditingController _searchController = TextEditingController();
|
|||||||
|
|
||||||
// Static list of 5 branches
|
// Static list of 5 branches
|
||||||
final List<Branch> _branches = [
|
final List<Branch> _branches = [
|
||||||
Branch(name: "Dharamsala - Head Office", code: "002", ifsc: "KACE0000002", address: "Civil Lines Dharmashala, Kangra, HP - 176215"),
|
Branch(
|
||||||
Branch(name: "Kangra", code: "033", ifsc: "KACE0000033", address: "Rajput Bhawankangrapo Kangra, Kangra, HP "),
|
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 = [];
|
List<Branch> _filteredBranches = [];
|
||||||
@@ -50,8 +63,6 @@ branch.address.toLowerCase().contains(lowerQuery);
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// @override
|
// @override
|
||||||
// Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
// return Scaffold(
|
// return Scaffold(
|
||||||
@@ -124,14 +135,20 @@ itemCount: _filteredBranches.length,
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final branch = _filteredBranches[index];
|
final branch = _filteredBranches[index];
|
||||||
return Card(
|
return Card(
|
||||||
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
margin: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12, vertical: 6),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(Icons.location_city, color: Theme.of(context).primaryColor),
|
leading: Icon(Icons.location_city,
|
||||||
title: Text(branch.name, style: const TextStyle(fontWeight: FontWeight.bold)),
|
color: Theme.of(context).primaryColor),
|
||||||
subtitle: Text("Code: ${branch.code} | IFSC: ${branch.ifsc} \nBranch Address: ${branch.address}"),
|
title: Text(branch.name,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontWeight: FontWeight.bold)),
|
||||||
|
subtitle: Text(
|
||||||
|
"Code: ${branch.code} | IFSC: ${branch.ifsc} \nBranch Address: ${branch.address}"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
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}")),
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -76,8 +76,7 @@ class _ServiceScreen extends State<ServiceScreen> {
|
|||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => const BranchLocatorScreen())
|
builder: (context) => const BranchLocatorScreen()));
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Divider(height: 1),
|
const Divider(height: 1),
|
||||||
|
@@ -71,8 +71,7 @@ Widget getBankLogo(String? bankName) {
|
|||||||
width: 40,
|
width: 40,
|
||||||
height: 40,
|
height: 40,
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return const Icon(
|
return const Icon(
|
||||||
Icons.account_balance,
|
Icons.account_balance,
|
||||||
size: 40,
|
size: 40,
|
||||||
|
Reference in New Issue
Block a user