Transaction Details Bug Fixed
This commit is contained in:
@@ -66,13 +66,15 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
transaction.type ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).transferType,
|
||||
transaction.name.split("/").first ?? ""),
|
||||
if (transaction.name.length > 12) ...[
|
||||
_buildDetailRow(AppLocalizations.of(context).utrNo,
|
||||
transaction.name.split("= ")[1].split(" ")[0] ?? ""),
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).beneficiaryAccountNo,
|
||||
transaction.name.split("A/C ").last ?? "")
|
||||
]
|
||||
// if (transaction.name.length > 12) ...[
|
||||
// _buildDetailRow(AppLocalizations.of(context).utrNo,
|
||||
// transaction.name.split("= ")[1].split(" ")[0] ?? ""),
|
||||
// _buildDetailRow(
|
||||
// AppLocalizations.of(context).beneficiaryAccountNo,
|
||||
// transaction.name.split("A/C ").last ?? "")
|
||||
// ]
|
||||
_buildDetailRow(AppLocalizations.of(context).details,
|
||||
transaction.name),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@@ -200,38 +200,38 @@ class LoginScreenState extends State<LoginScreen>
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Divider()),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text(AppLocalizations.of(context).or),
|
||||
),
|
||||
const Expanded(child: Divider()),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// const Expanded(child: Divider()),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
// child: Text(AppLocalizations.of(context).or),
|
||||
// ),
|
||||
// //const Expanded(child: Divider()),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
|
||||
const SizedBox(height: 25),
|
||||
|
||||
// Register Button
|
||||
SizedBox(
|
||||
width: 250,
|
||||
child: ElevatedButton(
|
||||
//disable until registration is implemented
|
||||
onPressed: null,
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
child: Text(AppLocalizations.of(context).register,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),),
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: 250,
|
||||
// child: ElevatedButton(
|
||||
// //disable until registration is implemented
|
||||
// onPressed: null,
|
||||
// style: OutlinedButton.styleFrom(
|
||||
// shape: const StadiumBorder(),
|
||||
// padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
// backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
// foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
// ),
|
||||
// child: Text(AppLocalizations.of(context).register,
|
||||
// style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@@ -17,86 +17,105 @@ class CardManagementScreen extends StatefulWidget {
|
||||
class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardManagement,
|
||||
),
|
||||
centerTitle: false,
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).cardManagement,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
CardManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).applyDebitCard,
|
||||
onTap: () {},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.remove_moderator,
|
||||
label: AppLocalizations.of(context).blockUnblockCard,
|
||||
onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => const BlockCardScreen(),
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.password_2,
|
||||
label: AppLocalizations.of(context).changeCardPin,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
CardManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).applyDebitCard,
|
||||
onTap: () {},
|
||||
disabled: true, // Add this
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.remove_moderator,
|
||||
label: AppLocalizations.of(context).blockUnblockCard,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const BlockCardScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
disabled: true,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.password_2,
|
||||
label: AppLocalizations.of(context).changeCardPin,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const CardPinChangeDetailsScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.payment_card,
|
||||
label: AppLocalizations.of(context).viewCardDeatils,
|
||||
onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => const CardDetailsScreen(),
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
disabled: true,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.payment_card,
|
||||
label: AppLocalizations.of(context).viewCardDeatils,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const CardDetailsScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
disabled: true,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CardManagementTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final VoidCallback onTap;
|
||||
final bool disabled;
|
||||
|
||||
const CardManagementTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.onTap,
|
||||
this.disabled = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(label),
|
||||
trailing: const Icon(Symbols.arrow_right, size: 20),
|
||||
onTap: onTap,
|
||||
leading: Icon(
|
||||
icon,
|
||||
color: disabled ? theme.disabledColor : null,
|
||||
),
|
||||
title: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: disabled ? theme.disabledColor : null,
|
||||
),
|
||||
),
|
||||
trailing: Icon(
|
||||
Symbols.arrow_right,
|
||||
size: 20,
|
||||
color: disabled ? theme.disabledColor : null,
|
||||
),
|
||||
onTap: disabled ? null : onTap,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@@ -138,6 +138,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
switch (accountType.toLowerCase()) {
|
||||
case 'sa':
|
||||
return AppLocalizations.of(context).savingsAccount;
|
||||
case 'sb':
|
||||
return AppLocalizations.of(context).savingsAccount;
|
||||
case 'ln':
|
||||
return AppLocalizations.of(context).loanAccount;
|
||||
case 'td':
|
||||
|
@@ -40,8 +40,8 @@ class _FundTransferBeneficiaryScreenState
|
||||
_beneficiaries = data
|
||||
.where((b) => widget.isOwnBank
|
||||
? b.bankName ==
|
||||
'THE KANGRA CENTRAL CO-OP BANK LIMITED' // Assuming 'KCCB' is your bank's name
|
||||
: b.bankName != 'THE KANGRA CENTRAL CO-OP BANK LIMITED')
|
||||
'THE KANGRA CENTRAL COOPERATIVE BANK LIMITED'
|
||||
: b.bankName != 'THE KANGRA CENTRAL COOPERATIVE BANK LIMITED')
|
||||
.toList();
|
||||
_isLoading = false;
|
||||
});
|
||||
|
@@ -13,72 +13,91 @@ class ServiceScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ServiceScreen extends State<ServiceScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).services,
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).services,
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningDeposit,
|
||||
onTap: () {},
|
||||
disabled: true, // Add this
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningDeposit,
|
||||
onTap: () {},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningLoan,
|
||||
onTap: () {},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.captive_portal,
|
||||
label: AppLocalizations.of(context).quickLinks,
|
||||
onTap: () {},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.missing_controller,
|
||||
label: AppLocalizations.of(context).branchLocator,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const BranchLocatorScreen()));
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: AppLocalizations.of(context).accountOpeningLoan,
|
||||
onTap: () {},
|
||||
disabled: true, // Add this
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.captive_portal,
|
||||
label: AppLocalizations.of(context).quickLinks,
|
||||
onTap: () {},
|
||||
disabled: true, // Add this
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.missing_controller,
|
||||
label: AppLocalizations.of(context).branchLocator,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const BranchLocatorScreen()));
|
||||
},
|
||||
disabled: true, // Add this
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ServiceManagementTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final VoidCallback onTap;
|
||||
final bool disabled; // Add this line
|
||||
|
||||
const ServiceManagementTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.onTap,
|
||||
this.disabled = false, // Add this line
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(label),
|
||||
trailing: const Icon(Symbols.arrow_right, size: 20),
|
||||
onTap: onTap,
|
||||
leading: Icon(
|
||||
icon,
|
||||
color: disabled ? theme.disabledColor : null, // Change color when disabled
|
||||
),
|
||||
title: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: disabled ? theme.disabledColor : null, // Change color when disabled
|
||||
),
|
||||
),
|
||||
trailing: Icon(
|
||||
Symbols.arrow_right,
|
||||
size: 20,
|
||||
color: disabled ? theme.disabledColor : null, // Change color when disabled
|
||||
),
|
||||
onTap: disabled ? null : onTap, // Disable onTap when disabled
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user