SimpleCloudNotifier/flutter/lib/state/app_theme.dart

17 lines
303 B
Dart
Raw Normal View History

2024-02-11 01:08:51 +01:00
import 'package:flutter/foundation.dart';
class AppTheme extends ChangeNotifier {
bool _darkmode = false;
bool get darkMode => _darkmode;
void setDarkMode(bool v) {
_darkmode = v;
notifyListeners();
}
void switchDarkMode() {
_darkmode = !_darkmode;
notifyListeners();
}
}