Skip to content

Commit

Permalink
Remove commented-out delete account dialog and related settings tiles…
Browse files Browse the repository at this point in the history
… from SettingsWidget
  • Loading branch information
Mozart299 committed Mar 5, 2025
1 parent 3a685ce commit e5d24c3
Showing 1 changed file with 70 additions and 70 deletions.
140 changes: 70 additions & 70 deletions src/mobile-v3/lib/src/app/profile/pages/widgets/settings_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,49 +92,49 @@ class _SettingsWidgetState extends State<SettingsWidget> {
}


void _showDeleteAccountDialog() {
final TextEditingController passwordController = TextEditingController();
// void _showDeleteAccountDialog() {
// final TextEditingController passwordController = TextEditingController();

showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text('Delete Account'),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text(
'WARNING: This action cannot be undone. All your data will be permanently deleted.',
style: TextStyle(color: Colors.red),
),
const SizedBox(height: 16),
TextField(
controller: passwordController,
obscureText: true,
decoration: const InputDecoration(
labelText: 'Enter Password to Confirm',
border: OutlineInputBorder(),
),
),
],
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text('Cancel'),
),
ElevatedButton(
onPressed: () {
// TODO: Implement actual account deletion logic
// Validate password, call backend deletion endpoint
Navigator.of(context).pushReplacementNamed('/login');
},
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
child: const Text('Delete Account'),
),
],
),
);
}
// showDialog(
// context: context,
// builder: (context) => AlertDialog(
// title: const Text('Delete Account'),
// content: Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// const Text(
// 'WARNING: This action cannot be undone. All your data will be permanently deleted.',
// style: TextStyle(color: Colors.red),
// ),
// const SizedBox(height: 16),
// TextField(
// controller: passwordController,
// obscureText: true,
// decoration: const InputDecoration(
// labelText: 'Enter Password to Confirm',
// border: OutlineInputBorder(),
// ),
// ),
// ],
// ),
// actions: [
// TextButton(
// onPressed: () => Navigator.pop(context),
// child: const Text('Cancel'),
// ),
// ElevatedButton(
// onPressed: () {
// // TODO: Implement actual account deletion logic
// // Validate password, call backend deletion endpoint
// Navigator.of(context).pushReplacementNamed('/login');
// },
// style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
// child: const Text('Delete Account'),
// ),
// ],
// ),
// );
// }

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -189,22 +189,22 @@ class _SettingsWidgetState extends State<SettingsWidget> {
// ),

// Our Story
SettingsTile(
iconPath: "assets/images/shared/airqo_story_icon.svg",
title: "Our Story",
onChanged: (value) {
print("Our Story tapped");
},
),
// SettingsTile(
// iconPath: "assets/images/shared/airqo_story_icon.svg",
// title: "Our Story",
// onChanged: (value) {
// print("Our Story tapped");
// },
// ),

// Terms and Privacy Policy
SettingsTile(
iconPath: "assets/images/shared/terms_and_privacy.svg",
title: "Terms and Privacy Policy",
onChanged: (value) {
print("Terms and Privacy Policy tapped");
},
),
// SettingsTile(
// iconPath: "assets/images/shared/terms_and_privacy.svg",
// title: "Terms and Privacy Policy",
// onChanged: (value) {
// print("Terms and Privacy Policy tapped");
// },
// ),

// Logout Button
Padding(
Expand All @@ -229,20 +229,20 @@ class _SettingsWidgetState extends State<SettingsWidget> {
),

// Delete Account Section
Padding(
padding: EdgeInsets.symmetric(horizontal: screenWidth * 0.3),
child: InkWell(
onTap: _showDeleteAccountDialog,
child: Text(
"Delete Account",
style: TextStyle(
color: Colors.red.shade300,
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
),
),
),
),
// Padding(
// padding: EdgeInsets.symmetric(horizontal: screenWidth * 0.3),
// child: InkWell(
// onTap: _showDeleteAccountDialog,
// child: Text(
// "Delete Account",
// style: TextStyle(
// color: Colors.red.shade300,
// fontWeight: FontWeight.bold,
// decoration: TextDecoration.underline,
// ),
// ),
// ),
// ),

SizedBox(height: screenHeight * 0.03),

Expand Down

0 comments on commit e5d24c3

Please sign in to comment.