cpd_app_gruppe_finanzplaner/lib/theme/theme_manager.dart

13 lines
290 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
2023-06-17 03:09:31 +02:00
class ThemeManager with ChangeNotifier {
ThemeMode _themeMode = ThemeMode.light;
2023-06-17 03:09:31 +02:00
ThemeMode get themeMode => _themeMode;
2023-06-17 03:09:31 +02:00
void toggleTheme(bool isDark) {
_themeMode = isDark ? ThemeMode.dark : ThemeMode.light;
notifyListeners();
2023-06-17 03:09:31 +02:00
}
}