import 'package:flutter/material.dart'; class SettingsCallPage extends StatefulWidget { const SettingsCallPage({super.key}); @override _SettingsCallPageState createState() => _SettingsCallPageState(); } class _SettingsCallPageState extends State { bool _enableVoicemail = true; bool _enableCallRecording = false; String _ringtone = 'Default'; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, appBar: AppBar( title: const Text('Calling Settings'), ), body: ListView( children: [ SwitchListTile( title: const Text('Enable Voicemail', style: TextStyle(color: Colors.white)), value: _enableVoicemail, onChanged: (bool value) { setState(() { _enableVoicemail = value; }); }, ), SwitchListTile( title: const Text('Enable Call Recording', style: TextStyle(color: Colors.white)), value: _enableCallRecording, onChanged: (bool value) { setState(() { _enableCallRecording = value; }); }, ), ListTile( title: const Text('Ringtone', style: TextStyle(color: Colors.white)), subtitle: Text(_ringtone, style: const TextStyle(color: Colors.grey)), trailing: const Icon(Icons.arrow_forward_ios, color: Colors.white), onTap: () { _selectRingtone(context); }, ), // Add more calling settings as needed ], ), ); } void _selectRingtone(BuildContext context) { // For demonstration, let's use a simple dialog showDialog( context: context, builder: (BuildContext context) { return SimpleDialog( title: const Text('Select Ringtone'), children: [ SimpleDialogOption( onPressed: () { Navigator.pop(context, 'Default'); }, child: const Text('Default'), ), SimpleDialogOption( onPressed: () { Navigator.pop(context, 'Classic'); }, child: const Text('Classic'), ), SimpleDialogOption( onPressed: () { Navigator.pop(context, 'Beep'); }, child: const Text('Beep'), ), // Add more ringtone options ], ); }, ).then((value) { if (value != null) { setState(() { _ringtone = value; }); } }); } }