// settingsAccounts.dart import 'package:flutter/material.dart'; import 'package:dialer/features/Settings/sim/chooseSim.dart'; import 'package:dialer/features/Settings/sim/simParameters.dart'; class SettingsAccountsPage extends StatelessWidget { const SettingsAccountsPage({super.key}); void _navigateToAccountOption(BuildContext context, String option) { switch (option) { case 'Choisir la SIM': Navigator.push( context, MaterialPageRoute(builder: (context) => const ChooseSimPage()), ); break; case 'Paramètre SIM': Navigator.push( context, MaterialPageRoute(builder: (context) => const SimParametersPage()), ); break; // Handle more options if needed default: break; } } @override Widget build(BuildContext context) { final accountOptions = [ 'Choisir la SIM', 'Paramètre SIM', ]; return Scaffold( backgroundColor: Colors.black, appBar: AppBar( title: const Text('Page des comptes téléphoniques'), ), body: ListView.builder( itemCount: accountOptions.length, itemBuilder: (context, index) { return ListTile( title: Text( accountOptions[index], style: const TextStyle(color: Colors.white), ), trailing: const Icon(Icons.arrow_forward_ios, color: Colors.white), onTap: () { _navigateToAccountOption(context, accountOptions[index]); }, ); }, ), ); } }