monorepo/dialer/lib/features/settings/sim/settings_accounts.dart
stcb 0da5e27830
All checks were successful
/ mirror (push) Successful in 5s
/ deploy (push) Successful in 40s
Removed French / clean bad english (#21)
Reviewed-on: icing/G-EIP-700-TLS-7-1-eip-stephane.corbiere#21
2024-12-20 10:31:35 +00:00

58 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'choose_sim.dart';
import 'sim_parameters.dart';
class SettingsAccountsPage extends StatelessWidget {
const SettingsAccountsPage({Key? key}) : super(key: key);
void _navigateToAccountOption(BuildContext context, String option) {
switch (option) {
case 'Chose SIM card':
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ChooseSimPage()),
);
break;
case 'SIM card parameters':
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SimParametersPage()),
);
break;
default:
break;
}
}
@override
Widget build(BuildContext context) {
final accountOptions = [
'Chose SIM card',
'SIM card parameters',
];
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
title: const Text('Sim settings'),
),
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]);
},
);
},
),
);
}
}