Surface/lib/providers/theme.dart

23 lines
514 B
Dart
Raw Normal View History

2024-12-22 05:07:22 +00:00
import 'dart:ui';
2024-11-08 16:09:46 +00:00
import 'package:flutter/foundation.dart';
import 'package:surface/theme.dart';
class ThemeProvider extends ChangeNotifier {
ThemeSet? theme;
2024-11-08 16:09:46 +00:00
ThemeProvider() {
createAppThemeSet().then((value) {
theme = value;
notifyListeners();
});
}
2024-12-22 05:07:22 +00:00
void reloadTheme({Color? seedColorOverride, bool? useMaterial3}) {
createAppThemeSet(seedColorOverride: seedColorOverride, useMaterial3: useMaterial3).then((value) {
theme = value;
notifyListeners();
});
2024-11-08 16:09:46 +00:00
}
}