merge branches
This commit is contained in:
@@ -11,26 +11,12 @@ class ThemeToggle extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final themeProvider = context.watch<ThemeProvider>();
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Icon(
|
||||
themeProvider.isDarkMode ? Icons.dark_mode : Icons.light_mode,
|
||||
color: AppColors.primaryTextColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
themeProvider.isDarkMode ? 'Dark Mode' : 'Light Mode',
|
||||
style: TextStyle(color: AppColors.primaryTextColor, fontSize: 16),
|
||||
),
|
||||
const Spacer(),
|
||||
Switch(
|
||||
value: themeProvider.isDarkMode,
|
||||
onChanged: (value) {
|
||||
themeProvider.toggleTheme();
|
||||
},
|
||||
activeColor: AppColors.primaryColor,
|
||||
),
|
||||
],
|
||||
return Switch(
|
||||
value: themeProvider.isDarkMode,
|
||||
onChanged: (value) {
|
||||
themeProvider.toggleTheme();
|
||||
},
|
||||
activeColor: AppColors.primaryColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user