SimpleCloudNotifier/flutter/lib/state/app_theme.dart

17 lines
303 B
Dart

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();
}
}