Transaction Details Bug Fixed
This commit is contained in:
@@ -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