mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-22 17:29:35 +00:00
refactor: remove unused ModeSelectionDialog as SegmentedButton handles theme selection
This commit is contained in:
parent
6bd2ebfc10
commit
d7d2b0d57c
1 changed files with 0 additions and 49 deletions
|
|
@ -207,52 +207,3 @@ extension StringExtension on String {
|
||||||
return Color(int.parse('0xff$substring(1)'));
|
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);
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue