2024-11-08 16:09:46 +00:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
import 'package:surface/theme.dart';
|
|
|
|
|
|
|
|
class ThemeProvider extends ChangeNotifier {
|
2024-11-10 13:48:42 +00:00
|
|
|
ThemeSet? theme;
|
2024-11-08 16:09:46 +00:00
|
|
|
|
|
|
|
ThemeProvider() {
|
2024-11-10 13:48:42 +00:00
|
|
|
createAppThemeSet().then((value) {
|
|
|
|
theme = value;
|
|
|
|
notifyListeners();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void reloadTheme({bool? useMaterial3}) {
|
|
|
|
createAppThemeSet().then((value) {
|
|
|
|
theme = value;
|
|
|
|
notifyListeners();
|
|
|
|
});
|
2024-11-08 16:09:46 +00:00
|
|
|
}
|
|
|
|
}
|