import 'package:kmobile/features/service/screens/branch_locator_screen.dart'; import '../../../l10n/app_localizations.dart'; import 'package:flutter/material.dart'; import 'package:material_symbols_icons/material_symbols_icons.dart'; class ServiceScreen extends StatefulWidget { const ServiceScreen({super.key}); @override State createState() => _ServiceScreen(); } class _ServiceScreen extends State { @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 ), 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, 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 ); } }