Watermark added, Card commented out and account opening commented out
This commit is contained in:
10
lib/app.dart
10
lib/app.dart
@@ -316,7 +316,7 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
|
||||
int _selectedIndex = 0;
|
||||
final List<Widget> _pages = [
|
||||
const DashboardScreen(),
|
||||
const CardManagementScreen(),
|
||||
// const CardManagementScreen(),
|
||||
const ServiceScreen(),
|
||||
];
|
||||
|
||||
@@ -374,10 +374,10 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
|
||||
icon: const Icon(Icons.home_filled),
|
||||
label: AppLocalizations.of(context).home,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.credit_card),
|
||||
label: AppLocalizations.of(context).card,
|
||||
),
|
||||
// BottomNavigationBarItem(
|
||||
// icon: const Icon(Icons.credit_card),
|
||||
// label: AppLocalizations.of(context).card,
|
||||
// ),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.miscellaneous_services),
|
||||
label: AppLocalizations.of(context).services,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
class Beneficiary {
|
||||
final String accountNo;
|
||||
final String accountType;
|
||||
|
||||
@@ -69,9 +69,9 @@ Dio _createDioClient() {
|
||||
final dio = Dio(
|
||||
BaseOptions(
|
||||
baseUrl:
|
||||
//'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', //test
|
||||
'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', //test
|
||||
//'http://lb-kccb-mobile-banking-app-848675342.ap-south-1.elb.amazonaws.com', //prod
|
||||
'https://kccbmbnk.net', //prod small
|
||||
//'https://kccbmbnk.net', //prod small
|
||||
connectTimeout: const Duration(seconds: 60),
|
||||
receiveTimeout: const Duration(seconds: 60),
|
||||
headers: {
|
||||
|
||||
@@ -34,12 +34,15 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
.accountInfo
|
||||
.replaceFirst(RegExp('\n'), '')),
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).accountNumber,
|
||||
style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
|
||||
style:
|
||||
const TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
|
||||
),
|
||||
|
||||
DropdownButton<User>(
|
||||
@@ -89,6 +92,20 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
: const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,9 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -147,7 +149,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(widget.accountNo, style: const TextStyle(fontSize: 17)),
|
||||
Text(widget.accountNo,
|
||||
style: const TextStyle(fontSize: 17)),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
@@ -247,7 +250,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
child: Container(
|
||||
height: 10,
|
||||
width: 100,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
color:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
),
|
||||
subtitle: Shimmer.fromColors(
|
||||
@@ -256,7 +260,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
child: Container(
|
||||
height: 8,
|
||||
width: 60,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
color:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -267,7 +272,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
AppLocalizations.of(context).noTransactions,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
)),
|
||||
)
|
||||
: ListView.separated(
|
||||
@@ -306,7 +312,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Text(
|
||||
"Bal: ₹${tx.balance}",
|
||||
style: const TextStyle(
|
||||
fontSize: 12), // Style matches tx.name
|
||||
fontSize:
|
||||
12), // Style matches tx.name
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -314,7 +321,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => TransactionDetailsScreen(
|
||||
builder: (_) =>
|
||||
TransactionDetailsScreen(
|
||||
transaction: tx),
|
||||
),
|
||||
);
|
||||
@@ -329,6 +337,20 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
_exportToPdf();
|
||||
|
||||
@@ -14,7 +14,9 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
return Scaffold(
|
||||
appBar:
|
||||
AppBar(title: Text(AppLocalizations.of(context).transactionDetails)),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -37,7 +39,9 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Icon(
|
||||
isCredit ? Symbols.call_received : Symbols.call_made,
|
||||
isCredit
|
||||
? Symbols.call_received
|
||||
: Symbols.call_made,
|
||||
color: isCredit ? Colors.green : Colors.red,
|
||||
size: 28,
|
||||
),
|
||||
@@ -62,7 +66,8 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
flex: 5,
|
||||
child: ListView(
|
||||
children: [
|
||||
_buildDetailRow(AppLocalizations.of(context).transactionType,
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).transactionType,
|
||||
transaction.type ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).transferType,
|
||||
transaction.name.split("/").first ?? ""),
|
||||
@@ -73,14 +78,28 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
// AppLocalizations.of(context).beneficiaryAccountNo,
|
||||
// transaction.name.split("A/C ").last ?? "")
|
||||
// ]
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).details, transaction.name),
|
||||
_buildDetailRow(AppLocalizations.of(context).details,
|
||||
transaction.name),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@ class TncRequiredScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: const Text('Terms and Conditions'),
|
||||
),
|
||||
body: Center(
|
||||
body: Stack(
|
||||
children: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
@@ -35,6 +37,20 @@ class TncRequiredScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Form(
|
||||
child: Stack(
|
||||
children: [
|
||||
Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -343,7 +345,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
LengthLimitingTextInputFormatter(11),
|
||||
],
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).ifscCode,
|
||||
labelText:
|
||||
AppLocalizations.of(context).ifscCode,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
@@ -360,7 +363,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
});
|
||||
},
|
||||
validator: (value) {
|
||||
final pattern = RegExp(r'^[A-Z]{4}0[A-Z0-9]{6}$');
|
||||
final pattern =
|
||||
RegExp(r'^[A-Z]{4}0[A-Z0-9]{6}$');
|
||||
if (value == null || value.trim().isEmpty) {
|
||||
return AppLocalizations.of(context).enterIfsc;
|
||||
} else if (!pattern.hasMatch(
|
||||
@@ -377,9 +381,11 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
// Bank Name (Disabled)
|
||||
TextFormField(
|
||||
controller: bankNameController,
|
||||
enabled: false, // changed from readOnly to disabled
|
||||
enabled:
|
||||
false, // changed from readOnly to disabled
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).bankName,
|
||||
labelText:
|
||||
AppLocalizations.of(context).bankName,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
@@ -388,9 +394,11 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
// 🔹 Branch Name (Disabled)
|
||||
TextFormField(
|
||||
controller: branchNameController,
|
||||
enabled: false, // changed from readOnly to disabled
|
||||
enabled:
|
||||
false, // changed from readOnly to disabled
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).branchName,
|
||||
labelText:
|
||||
AppLocalizations.of(context).branchName,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
@@ -418,9 +426,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
isDense: true,
|
||||
),
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value == null ||
|
||||
value.isEmpty
|
||||
? AppLocalizations.of(context).nameRequired
|
||||
validator: (value) =>
|
||||
value == null || value.isEmpty
|
||||
? AppLocalizations.of(context)
|
||||
.nameRequired
|
||||
: null,
|
||||
),
|
||||
],
|
||||
@@ -437,7 +446,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
? null
|
||||
: () {
|
||||
final isAccountValid =
|
||||
_accountNumberFieldKey.currentState!
|
||||
_accountNumberFieldKey
|
||||
.currentState!
|
||||
.validate();
|
||||
final isConfirmAccountValid =
|
||||
_confirmAccountNumberFieldKey
|
||||
@@ -470,7 +480,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
DropdownButtonFormField<String>(
|
||||
value: accountType,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).accountType,
|
||||
labelText:
|
||||
AppLocalizations.of(context).accountType,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
@@ -503,8 +514,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
isDense: true,
|
||||
),
|
||||
textInputAction: TextInputAction.done,
|
||||
validator: (value) =>
|
||||
value == null || value.length != 10
|
||||
validator: (value) => value == null ||
|
||||
value.length != 10
|
||||
? AppLocalizations.of(context).enterValidPhone
|
||||
: null,
|
||||
),
|
||||
@@ -525,8 +536,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor:
|
||||
Theme.of(context).colorScheme.primaryContainer,
|
||||
foregroundColor:
|
||||
Theme.of(context).colorScheme.onPrimaryContainer),
|
||||
foregroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.onPrimaryContainer),
|
||||
child: Text(
|
||||
AppLocalizations.of(context).validateAndAdd,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
@@ -537,6 +549,20 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,9 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
|
||||
title: Text(AppLocalizations.of(context).beneficiarydetails),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -104,9 +106,11 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 24),
|
||||
_buildDetailRow('${AppLocalizations.of(context).bankName} ',
|
||||
beneficiary.bankName ?? 'N/A'),
|
||||
_buildDetailRow('${AppLocalizations.of(context).accountNumber} ',
|
||||
_buildDetailRow(
|
||||
'${AppLocalizations.of(context).accountNumber} ',
|
||||
beneficiary.accountNo),
|
||||
_buildDetailRow('${AppLocalizations.of(context).accountType} ',
|
||||
_buildDetailRow(
|
||||
'${AppLocalizations.of(context).accountType} ',
|
||||
beneficiary.accountType),
|
||||
_buildDetailRow('${AppLocalizations.of(context).ifscCode} ',
|
||||
beneficiary.ifscCode),
|
||||
@@ -136,6 +140,20 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,23 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).beneficiaries),
|
||||
),
|
||||
body: _isLoading ? _buildShimmerList() : _buildBeneficiaryList(),
|
||||
body: Stack(
|
||||
children: [
|
||||
_isLoading ? _buildShimmerList() : _buildBeneficiaryList(),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
floatingActionButton: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
child: FloatingActionButton(
|
||||
|
||||
@@ -61,7 +61,9 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -100,18 +102,21 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black, width: 2),
|
||||
borderSide:
|
||||
BorderSide(color: Colors.black, width: 2),
|
||||
),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.next,
|
||||
obscureText: true,
|
||||
validator: (value) => value != null && value.length == 3
|
||||
validator: (value) =>
|
||||
value != null && value.length == 3
|
||||
? null
|
||||
: AppLocalizations.of(context).cvv3Digits,
|
||||
),
|
||||
@@ -128,15 +133,18 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black, width: 2),
|
||||
borderSide:
|
||||
BorderSide(color: Colors.black, width: 2),
|
||||
),
|
||||
),
|
||||
validator: (value) => value != null && value.isNotEmpty
|
||||
validator: (value) => value != null &&
|
||||
value.isNotEmpty
|
||||
? null
|
||||
: AppLocalizations.of(context).selectExpiryDate,
|
||||
),
|
||||
@@ -188,6 +196,20 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ class CardDetailsScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: const Text("My Cards"),
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: ListView(
|
||||
children: const [
|
||||
@@ -31,6 +33,20 @@ class CardDetailsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
CardManagementTile(
|
||||
icon: Symbols.add,
|
||||
@@ -78,6 +80,20 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,9 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -90,18 +92,21 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black, width: 2),
|
||||
borderSide:
|
||||
BorderSide(color: Colors.black, width: 2),
|
||||
),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.next,
|
||||
obscureText: true,
|
||||
validator: (value) => value != null && value.length == 3
|
||||
validator: (value) =>
|
||||
value != null && value.length == 3
|
||||
? null
|
||||
: AppLocalizations.of(context).cvv3Digits,
|
||||
),
|
||||
@@ -118,15 +123,18 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.black, width: 2),
|
||||
borderSide:
|
||||
BorderSide(color: Colors.black, width: 2),
|
||||
),
|
||||
),
|
||||
validator: (value) => value != null && value.isNotEmpty
|
||||
validator: (value) => value != null &&
|
||||
value.isNotEmpty
|
||||
? null
|
||||
: AppLocalizations.of(context).selectExpiryDate,
|
||||
),
|
||||
@@ -178,6 +186,20 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,9 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -133,6 +135,20 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,9 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
const SizedBox(height: 15),
|
||||
ChequeManagementTile(
|
||||
@@ -37,7 +39,8 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const EnquiryScreen()),
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const EnquiryScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -68,6 +71,20 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
.replaceFirst(RegExp('\n'), ''),
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
body: Stack(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
@@ -102,6 +104,20 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart';
|
||||
import 'package:kmobile/features/profile/profile_screen.dart';
|
||||
import 'package:kmobile/features/quick_pay/screens/quick_pay_screen.dart';
|
||||
import 'package:kmobile/features/service/screens/branch_locator_screen.dart';
|
||||
import 'package:kmobile/security/secure_storage.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
@@ -547,9 +548,14 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
.accountType!,
|
||||
)));
|
||||
}),
|
||||
_buildQuickLink(Symbols.checkbook,
|
||||
AppLocalizations.of(context).handleCheque, () {},
|
||||
disable: true),
|
||||
_buildQuickLink(Icons.location_pin, "Branch Locator",
|
||||
() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
const BranchLocatorScreen()));
|
||||
}, disable: false),
|
||||
_buildQuickLink(Icons.group,
|
||||
AppLocalizations.of(context).manageBeneficiary,
|
||||
() {
|
||||
|
||||
@@ -70,7 +70,9 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
title: Text(AppLocalizations.of(context).enquiry),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -84,7 +86,8 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decorationColor: Theme.of(context).colorScheme.primary,
|
||||
decorationColor:
|
||||
Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
@@ -131,6 +134,20 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,9 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
title: Text(loc.fundTransfer.replaceFirst(RegExp('\n'), '')),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -398,8 +400,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
elevation: 0,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: ListTile(
|
||||
leading:
|
||||
getBankLogo(widget.creditBeneficiary.bankName, context),
|
||||
leading: getBankLogo(
|
||||
widget.creditBeneficiary.bankName, context),
|
||||
title: Text(widget.creditBeneficiary.name),
|
||||
subtitle: Text(widget.creditBeneficiary.accountNo),
|
||||
),
|
||||
@@ -431,7 +433,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
});
|
||||
},
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
selectedColor: Theme.of(context).colorScheme.onPrimary,
|
||||
selectedColor:
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
fillColor: Theme.of(context).colorScheme.primary,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
borderColor: Colors.transparent,
|
||||
@@ -513,6 +516,20 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,23 @@ class _FundTransferBeneficiaryScreenState
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).beneficiaries),
|
||||
),
|
||||
body: _isLoading ? _buildShimmerList() : _buildBeneficiaryList(),
|
||||
body: Stack(
|
||||
children: [
|
||||
_isLoading ? _buildShimmerList() : _buildBeneficiaryList(),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,9 @@ class FundTransferScreen extends StatelessWidget {
|
||||
// Wrap with BlocBuilder to check the authentication state
|
||||
body: BlocBuilder<AuthCubit, AuthState>(
|
||||
builder: (context, state) {
|
||||
return ListView(
|
||||
return Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
FundTransferManagementTile(
|
||||
icon: Symbols.person,
|
||||
@@ -92,6 +94,20 @@ class FundTransferScreen extends StatelessWidget {
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -45,7 +45,9 @@ class FundTransferSelfAccountsScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: const Text("Select Account"),
|
||||
),
|
||||
body: filteredAccounts.isEmpty
|
||||
body: Stack(
|
||||
children: [
|
||||
filteredAccounts.isEmpty
|
||||
? const Center(
|
||||
child: Text("No other accounts found"),
|
||||
)
|
||||
@@ -67,7 +69,8 @@ class FundTransferSelfAccountsScreen extends StatelessWidget {
|
||||
Text(account.accountNo ?? 'N/A'),
|
||||
Text(
|
||||
_getFullAccountType(account.accountType),
|
||||
style: TextStyle(fontSize: 12, color: Colors.grey[600]),
|
||||
style: TextStyle(
|
||||
fontSize: 12, color: Colors.grey[600]),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -88,6 +91,20 @@ class FundTransferSelfAccountsScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,9 @@ class _FundTransferSelfAmountScreenState
|
||||
title: const Text("Fund Transfer"),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -238,6 +240,20 @@ class _FundTransferSelfAmountScreenState
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,8 @@ class _TpinOtpScreenState extends State<TpinOtpScreen> {
|
||||
counterText: '',
|
||||
filled: true,
|
||||
fillColor: Colors.grey[200],
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 16),
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(vertical: 16),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(
|
||||
|
||||
@@ -143,6 +143,18 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -70,7 +70,9 @@ class _ChangePasswordOTPScreenState extends State<ChangePasswordOTPScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(AppLocalizations.of(context).otpVerification)),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
@@ -105,6 +107,20 @@ class _ChangePasswordOTPScreenState extends State<ChangePasswordOTPScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,9 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
||||
return Scaffold(
|
||||
appBar:
|
||||
AppBar(title: Text(AppLocalizations.of(context).changeLoginPassword)),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -121,8 +123,8 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
||||
icon: Icon(_showNewPassword
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off),
|
||||
onPressed: () =>
|
||||
setState(() => _showNewPassword = !_showNewPassword),
|
||||
onPressed: () => setState(
|
||||
() => _showNewPassword = !_showNewPassword),
|
||||
),
|
||||
),
|
||||
validator: validateNewPassword,
|
||||
@@ -152,6 +154,20 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,9 @@ class PreferenceScreen extends StatelessWidget {
|
||||
),
|
||||
body: BlocBuilder<ThemeCubit, ThemeState>(
|
||||
builder: (context, state) {
|
||||
return ListView(
|
||||
return Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
//Set Prefered Username
|
||||
// ListTile(
|
||||
@@ -58,6 +60,20 @@ class PreferenceScreen extends StatelessWidget {
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -60,7 +60,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context).biometricsNotAvailable)),
|
||||
content:
|
||||
Text(AppLocalizations.of(context).biometricsNotAvailable)),
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -164,11 +165,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
appBar: AppBar(
|
||||
title: Text(loc.profile), // Localized "Profile"
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings),
|
||||
title: Text(loc.preferences),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -177,26 +181,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.currency_rupee),
|
||||
title: Text(AppLocalizations.of(context).dailylimit),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const DailyLimitScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context).enableFingerprintLogin),
|
||||
value: _isBiometricEnabled,
|
||||
onChanged: (bool value) {
|
||||
// The state is now managed within _handleBiometricToggle
|
||||
_handleBiometricToggle(value);
|
||||
},
|
||||
secondary: const Icon(Icons.fingerprint),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.security),
|
||||
title: Text(loc.securitySettings),
|
||||
@@ -212,12 +196,34 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.currency_rupee),
|
||||
title: Text(AppLocalizations.of(context).dailylimit),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const DailyLimitScreen()),
|
||||
);
|
||||
},
|
||||
),
|
||||
SwitchListTile(
|
||||
title:
|
||||
Text(AppLocalizations.of(context).enableFingerprintLogin),
|
||||
value: _isBiometricEnabled,
|
||||
onChanged: (bool value) {
|
||||
// The state is now managed within _handleBiometricToggle
|
||||
_handleBiometricToggle(value);
|
||||
},
|
||||
secondary: const Icon(Icons.fingerprint),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.smartphone),
|
||||
title: const Text("App Version"),
|
||||
trailing: FutureBuilder<String>(
|
||||
future: _getAppVersion(),
|
||||
builder: (BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||
builder:
|
||||
(BuildContext context, AsyncSnapshot<String> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// Show a loading indicator while waiting for the future to complete
|
||||
return const CircularProgressIndicator();
|
||||
@@ -279,6 +285,20 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
title: Text(loc.securitySettings),
|
||||
centerTitle: true,
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.lock_outline),
|
||||
@@ -92,7 +94,8 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const TpinSetScreen(),
|
||||
builder: (context) =>
|
||||
const TpinSetScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -116,6 +119,20 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,7 +458,9 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -496,7 +498,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary, width: 2),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
controller: accountNumberController,
|
||||
@@ -511,7 +514,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
},
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).accountNumberRequired;
|
||||
return AppLocalizations.of(context)
|
||||
.accountNumberRequired;
|
||||
} else if (value.length < 7 || value.length > 20) {
|
||||
return AppLocalizations.of(context).accno7to20;
|
||||
}
|
||||
@@ -522,7 +526,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
TextFormField(
|
||||
controller: confirmAccountNumberController,
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).confirmAccountNumber,
|
||||
labelText:
|
||||
AppLocalizations.of(context).confirmAccountNumber,
|
||||
// prefixIcon: Icon(Icons.person),
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
@@ -534,14 +539,16 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary, width: 2),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).reenterAccountNumber;
|
||||
return AppLocalizations.of(context)
|
||||
.reenterAccountNumber;
|
||||
}
|
||||
if (value != accountNumberController.text) {
|
||||
return AppLocalizations.of(context).accountMismatch;
|
||||
@@ -565,7 +572,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
@@ -614,7 +622,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
fillColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
@@ -630,7 +639,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
'Current',
|
||||
]
|
||||
.map(
|
||||
(e) => DropdownMenuItem(value: e, child: Text(e)),
|
||||
(e) =>
|
||||
DropdownMenuItem(value: e, child: Text(e)),
|
||||
)
|
||||
.toList(),
|
||||
onChanged: (value) => setState(() {
|
||||
@@ -656,7 +666,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary, width: 2),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -708,10 +719,11 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
child:
|
||||
CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
: Text(
|
||||
AppLocalizations.of(context).validateBeneficiary),
|
||||
: Text(AppLocalizations.of(context)
|
||||
.validateBeneficiary),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -720,8 +732,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
padding: const EdgeInsets.only(bottom: 24.0),
|
||||
child: Text(
|
||||
_validationError!,
|
||||
style:
|
||||
TextStyle(color: Theme.of(context).colorScheme.error),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.error),
|
||||
),
|
||||
),
|
||||
TextFormField(
|
||||
@@ -739,7 +751,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary, width: 2),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
validator: (value) {
|
||||
@@ -764,7 +777,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary, width: 2),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -788,16 +802,20 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color:
|
||||
Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) => value == null || value.isEmpty
|
||||
validator: (value) => value == null ||
|
||||
value.isEmpty
|
||||
? AppLocalizations.of(context).phoneRequired
|
||||
: null,
|
||||
),
|
||||
@@ -814,11 +832,14 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.outline),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color:
|
||||
Theme.of(context).colorScheme.primary,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
@@ -832,7 +853,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
}
|
||||
final amount = double.tryParse(value);
|
||||
if (amount == null || amount <= 0) {
|
||||
return AppLocalizations.of(context).validAmount;
|
||||
return AppLocalizations.of(context)
|
||||
.validAmount;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -880,7 +902,10 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
: Theme.of(context).colorScheme.primary,
|
||||
activeTrackColor: _isAmountOverLimit
|
||||
? Colors.grey.shade300
|
||||
: Theme.of(context).colorScheme.secondary.withAlpha(100),
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary
|
||||
.withAlpha(100),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
height: 56,
|
||||
onSwipe: () {
|
||||
@@ -900,6 +925,20 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ class _QuickPayScreen extends State<QuickPayScreen> {
|
||||
AppLocalizations.of(context).quickPay.replaceAll('\n', ''),
|
||||
),
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
children: [
|
||||
QuickPayManagementTile(
|
||||
icon: Symbols.input_circle,
|
||||
@@ -55,6 +57,20 @@ class _QuickPayScreen extends State<QuickPayScreen> {
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,9 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
@@ -159,14 +161,16 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
const SizedBox(height: 10),
|
||||
TextFormField(
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).debitAccountNumber,
|
||||
labelText:
|
||||
AppLocalizations.of(context).debitAccountNumber,
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
fillColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
readOnly: true,
|
||||
controller: TextEditingController(text: widget.debitAccount),
|
||||
controller:
|
||||
TextEditingController(text: widget.debitAccount),
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.next,
|
||||
enabled: false,
|
||||
@@ -195,9 +199,11 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).accountNumberRequired;
|
||||
return AppLocalizations.of(context)
|
||||
.accountNumberRequired;
|
||||
} else if (value.length != 11) {
|
||||
return AppLocalizations.of(context).validAccountNumber;
|
||||
return AppLocalizations.of(context)
|
||||
.validAccountNumber;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -227,7 +233,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
textInputAction: TextInputAction.next,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return AppLocalizations.of(context).reenterAccountNumber;
|
||||
return AppLocalizations.of(context)
|
||||
.reenterAccountNumber;
|
||||
}
|
||||
if (value != accountNumberController.text) {
|
||||
return AppLocalizations.of(context).accountMismatch;
|
||||
@@ -244,7 +251,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
onPressed: _isValidating
|
||||
? null
|
||||
: () {
|
||||
if (accountNumberController.text.length == 11 &&
|
||||
if (accountNumberController.text.length ==
|
||||
11 &&
|
||||
confirmAccountNumberController.text ==
|
||||
accountNumberController.text) {
|
||||
_validateBeneficiary();
|
||||
@@ -260,8 +268,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child:
|
||||
CircularProgressIndicator(strokeWidth: 2),
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2),
|
||||
)
|
||||
: Text(AppLocalizations.of(context)
|
||||
.validateBeneficiary),
|
||||
@@ -278,7 +286,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
Text(
|
||||
'${AppLocalizations.of(context).beneficiaryName}: $_beneficiaryName',
|
||||
style: const TextStyle(
|
||||
color: Colors.green, fontWeight: FontWeight.bold),
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -432,7 +441,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TransactionPinScreen(
|
||||
onPinCompleted: (pinScreenContext, tpin) async {
|
||||
onPinCompleted:
|
||||
(pinScreenContext, tpin) async {
|
||||
final transfer = Transfer(
|
||||
fromAccount: widget.debitAccount,
|
||||
toAccount: accountNumberController.text,
|
||||
@@ -442,14 +452,17 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
remarks: remarksController.text,
|
||||
);
|
||||
|
||||
final paymentService = getIt<PaymentService>();
|
||||
final paymentService =
|
||||
getIt<PaymentService>();
|
||||
final paymentResponseFuture = paymentService
|
||||
.processQuickPayWithinBank(transfer);
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
Navigator.of(pinScreenContext)
|
||||
.pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: paymentResponseFuture),
|
||||
paymentResponse:
|
||||
paymentResponseFuture),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -465,6 +478,20 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ class SecurityErrorScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Padding(
|
||||
body: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -21,17 +23,32 @@ class SecurityErrorScreen extends StatelessWidget {
|
||||
Text(
|
||||
message,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w600),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
ElevatedButton(
|
||||
onPressed: () =>
|
||||
SystemChannels.platform.invokeMethod('SystemNavigator.pop'),
|
||||
onPressed: () => SystemChannels.platform
|
||||
.invokeMethod('SystemNavigator.pop'),
|
||||
child: const Text('Okay'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
175
lib/features/service/screens/atm_locator_screen.dart
Normal file
175
lib/features/service/screens/atm_locator_screen.dart
Normal file
@@ -0,0 +1,175 @@
|
||||
// ignore_for_file: unused_element
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
// Enum to define the type of location
|
||||
|
||||
class Location {
|
||||
final String name;
|
||||
final String address;
|
||||
|
||||
Location({
|
||||
required this.name,
|
||||
required this.address,
|
||||
});
|
||||
}
|
||||
|
||||
class ATMLocatorScreen extends StatefulWidget {
|
||||
const ATMLocatorScreen({super.key});
|
||||
|
||||
@override
|
||||
State<ATMLocatorScreen> createState() => _ATMLocatorScreenState();
|
||||
}
|
||||
|
||||
class _ATMLocatorScreenState extends State<ATMLocatorScreen> {
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
|
||||
final List<Location> _allLocations = [
|
||||
Location(
|
||||
name: "Dharamsala ATM",
|
||||
address: "Near Main Square, Dharamsala",
|
||||
),
|
||||
Location(
|
||||
name: "Kangra ATM",
|
||||
address: "Opposite Bus Stand, Kangra",
|
||||
),
|
||||
];
|
||||
|
||||
List<Location> _filteredLocations = [];
|
||||
bool _isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// _fetchAndSetLocations();
|
||||
_filteredLocations = _allLocations;
|
||||
}
|
||||
|
||||
// Example of a future API fetching function
|
||||
/*
|
||||
Future<void> _fetchAndSetLocations() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
// final locations = await yourApiService.getLocations();
|
||||
// setState(() {
|
||||
// _allLocations = locations;
|
||||
// _filteredLocations = locations;
|
||||
// });
|
||||
} catch (e) {
|
||||
// Handle error
|
||||
} finally {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
*/
|
||||
void _filterLocations(String query) {
|
||||
setState(() {
|
||||
if (query.isEmpty) {
|
||||
_filteredLocations = _allLocations;
|
||||
} else {
|
||||
_filteredLocations = _allLocations.where((location) {
|
||||
final lowerQuery = query.toLowerCase();
|
||||
return location.name.toLowerCase().contains(lowerQuery) ||
|
||||
location.address.toLowerCase().contains(lowerQuery);
|
||||
}).toList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("ATM Locator"),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
onChanged: _filterLocations,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Name/Address",
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Content area
|
||||
Expanded(
|
||||
child: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: _filteredLocations.isEmpty
|
||||
? const Center(
|
||||
child: Text("No matching locations found"))
|
||||
: ListView.builder(
|
||||
itemCount: _filteredLocations.length,
|
||||
itemBuilder: (context, index) {
|
||||
final location = _filteredLocations[index];
|
||||
return _buildLocationItem(location);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHeader(String title) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
|
||||
child: Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Helper widget to build a single location item
|
||||
Widget _buildLocationItem(Location location) {
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.currency_rupee),
|
||||
title: Text(location.name,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Text(
|
||||
"Address: ${location.address}",
|
||||
),
|
||||
onTap: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text("Selected ${location.name}")),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,22 +3,17 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
// Enum to define the type of location
|
||||
enum LocationType { branch, atm }
|
||||
|
||||
class Location {
|
||||
final String name;
|
||||
final String? code; // Nullable for ATMs
|
||||
final String? ifsc; // Nullable for ATMs
|
||||
final String address;
|
||||
final LocationType type;
|
||||
|
||||
Location({
|
||||
required this.name,
|
||||
this.code,
|
||||
this.ifsc,
|
||||
required this.address,
|
||||
required this.type,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,24 +33,12 @@ class _BranchLocatorScreenState extends State<BranchLocatorScreen> {
|
||||
code: "002",
|
||||
ifsc: "KACE0000002",
|
||||
address: "Civil Lines Dharmashala, Kangra, HP - 176215",
|
||||
type: LocationType.branch,
|
||||
),
|
||||
Location(
|
||||
name: "Kangra",
|
||||
code: "033",
|
||||
ifsc: "KACE0000033",
|
||||
address: "Rajput Bhawankangrapo, Kangra, HP ",
|
||||
type: LocationType.branch,
|
||||
),
|
||||
Location(
|
||||
name: "Dharamsala ATM",
|
||||
address: "Near Main Square, Dharamsala",
|
||||
type: LocationType.atm,
|
||||
),
|
||||
Location(
|
||||
name: "Kangra ATM",
|
||||
address: "Opposite Bus Stand, Kangra",
|
||||
type: LocationType.atm,
|
||||
),
|
||||
];
|
||||
|
||||
@@ -112,7 +95,9 @@ Future<void> _fetchAndSetLocations() async {
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).branchLocator),
|
||||
),
|
||||
body: Column(
|
||||
body: Stack(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
@@ -134,7 +119,8 @@ Future<void> _fetchAndSetLocations() async {
|
||||
child: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: _filteredLocations.isEmpty
|
||||
? const Center(child: Text("No matching locations found"))
|
||||
? const Center(
|
||||
child: Text("No matching locations found"))
|
||||
: ListView.builder(
|
||||
itemCount: _filteredLocations.length,
|
||||
itemBuilder: (context, index) {
|
||||
@@ -145,6 +131,20 @@ Future<void> _fetchAndSetLocations() async {
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -163,20 +163,16 @@ Future<void> _fetchAndSetLocations() async {
|
||||
|
||||
// Helper widget to build a single location item
|
||||
Widget _buildLocationItem(Location location) {
|
||||
final isBranch = location.type == LocationType.branch;
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
child: Icon(isBranch ? Icons.location_city : Icons.currency_rupee),
|
||||
leading: const CircleAvatar(
|
||||
child: Icon(Icons.location_city),
|
||||
),
|
||||
title: Text(location.name,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Text(
|
||||
isBranch
|
||||
? "Code: ${location.code} | IFSC: ${location.ifsc}\nAddress: ${location.address}"
|
||||
: "Address: ${location.address}",
|
||||
),
|
||||
"Code: ${location.code} | IFSC: ${location.ifsc}\nAddress: ${location.address}"),
|
||||
onTap: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text("Selected ${location.name}")),
|
||||
|
||||
@@ -42,6 +42,22 @@ class _FaqsScreenState extends State<FaqsScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,22 @@ class _QuickLinksScreenState extends State<QuickLinksScreen> {
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).quickLinks),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:kmobile/features/service/screens/atm_locator_screen.dart';
|
||||
import 'package:kmobile/features/service/screens/branch_locator_screen.dart';
|
||||
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
@@ -24,22 +25,24 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
body: Stack(
|
||||
children: [
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningDeposit,
|
||||
onTap: () {},
|
||||
disabled: true,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningLoan,
|
||||
onTap: () {},
|
||||
disabled: true,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListView(
|
||||
children: [
|
||||
// ServiceManagementTile(
|
||||
// icon: Symbols.add,
|
||||
// label: AppLocalizations.of(context).accountOpeningDeposit,
|
||||
// onTap: () {},
|
||||
// disabled: true,
|
||||
// ),
|
||||
// const Divider(height: 1),
|
||||
// ServiceManagementTile(
|
||||
// icon: Symbols.add,
|
||||
// label: AppLocalizations.of(context).accountOpeningLoan,
|
||||
// onTap: () {},
|
||||
// disabled: true,
|
||||
// ),
|
||||
// const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.captive_portal,
|
||||
label: AppLocalizations.of(context).quickLinks,
|
||||
@@ -49,7 +52,7 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
builder: (context) => const QuickLinksScreen()),
|
||||
);
|
||||
},
|
||||
disabled: true,
|
||||
disabled: false,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
@@ -60,23 +63,37 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
MaterialPageRoute(builder: (context) => const FaqsScreen()),
|
||||
);
|
||||
},
|
||||
disabled: true,
|
||||
disabled: false,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.location_pin,
|
||||
label: AppLocalizations.of(context).branchLocator,
|
||||
label: "ATM Locator",
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const BranchLocatorScreen()));
|
||||
builder: (context) => const ATMLocatorScreen()));
|
||||
},
|
||||
disabled: true,
|
||||
disabled: false,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
child: Center(
|
||||
child: Opacity(
|
||||
opacity: 0.1, // Low opacity
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 200, // Adjust size as needed
|
||||
height: 200, // Adjust size as needed
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@ void main() async {
|
||||
]);
|
||||
|
||||
// Check for device compromise
|
||||
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
||||
if (compromisedMessage != null) {
|
||||
runApp(MaterialApp(
|
||||
home: SecurityErrorScreen(message: compromisedMessage),
|
||||
));
|
||||
return;
|
||||
}
|
||||
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
||||
// if (compromisedMessage != null) {
|
||||
// runApp(MaterialApp(
|
||||
// home: SecurityErrorScreen(message: compromisedMessage),
|
||||
// ));
|
||||
// return;
|
||||
// }
|
||||
await setupDependencies();
|
||||
runApp(const KMobile());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user