refactor: remove unused ModeSelectionDialog as SegmentedButton handles theme selection

This commit is contained in:
Dr.Blank 2025-05-22 07:14:36 +05:30
parent 6bd2ebfc10
commit d7d2b0d57c
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B

View file

@ -207,52 +207,3 @@ extension StringExtension on String {
return Color(int.parse('0xff$substring(1)'));
}
}
// ModeSelectionDialog is no longer needed as SegmentedButton handles selection directly.
// class ModeSelectionDialog extends HookConsumerWidget {
// final ThemeMode themeMode;
// const ModeSelectionDialog({
// super.key,
// required this.themeMode,
// });
// @override
// Widget build(BuildContext context, WidgetRef ref) {
// final selectedTheme = useState(themeMode);
// // a wrap of chips to show the available modes with icons
// return AlertDialog(
// title: const Text('Select Theme Mode'),
// content: Wrap(
// spacing: 8.0,
// runSpacing: 8.0,
// children: ThemeMode.values
// .map(
// (mode) => ChoiceChip(
// avatar: switch (mode) {
// ThemeMode.system => const Icon(Icons.auto_awesome),
// ThemeMode.light => const Icon(Icons.light_mode),
// ThemeMode.dark => const Icon(Icons.dark_mode),
// },
// showCheckmark: false,
// label: Text(mode.pascalCase),
// selected: mode == selectedTheme.value,
// onSelected: (selected) {
// if (selected) {
// selectedTheme.value = mode;
// }
// },
// ),
// )
// .toList(),
// ),
// actions: [
// CancelButton(),
// OkButton(
// onPressed: () {
// Navigator.pop(context, selectedTheme.value);
// },
// ),
// ],
// );
// }
// }