.github
android
assets
ios
lib
controllers
providers
adapters
sn_attachment.dart
sn_network.dart
theme.dart
userinfo.dart
screens
types
widgets
main.dart
router.dart
theme.dart
linux
macos
web
windows
.fvmrc
.gitignore
.metadata
README.md
analysis_options.yaml
build.yaml
devtools_options.yaml
pubspec.lock
pubspec.yaml
21 lines
405 B
Dart
21 lines
405 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:surface/theme.dart';
|
|
|
|
class ThemeProvider extends ChangeNotifier {
|
|
ThemeSet? theme;
|
|
|
|
ThemeProvider() {
|
|
createAppThemeSet().then((value) {
|
|
theme = value;
|
|
notifyListeners();
|
|
});
|
|
}
|
|
|
|
void reloadTheme({bool? useMaterial3}) {
|
|
createAppThemeSet().then((value) {
|
|
theme = value;
|
|
notifyListeners();
|
|
});
|
|
}
|
|
}
|