basic api access, state managment etc
This commit is contained in:
16
flutter/lib/state/app_theme.dart
Normal file
16
flutter/lib/state/app_theme.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user