界面完善

This commit is contained in:
DelLevin-Home
2026-06-20 21:32:23 +08:00
parent e193c294af
commit a84d4c03e8
11 changed files with 1241 additions and 287 deletions

View File

@@ -47,6 +47,9 @@ class AppProvider extends ChangeNotifier {
// 主题模式
ThemeMode _themeMode = ThemeMode.system;
// 配色方案索引
int _colorSchemeIndex = 0;
/// 是否使用远程服务端(同步开关 + 已激活)
bool get _useRemote {
final prefs = UserPrefs();
@@ -206,6 +209,7 @@ class AppProvider extends ChangeNotifier {
bool get drawerOpen => _drawerOpen;
bool get bottomNavVisible => _bottomNavVisible;
ThemeMode get themeMode => _themeMode;
int get colorSchemeIndex => _colorSchemeIndex;
List<Movie> get movies => _movies;
List<Book> get books => _books;
List<Note> get notes => _notes;
@@ -263,9 +267,18 @@ class AppProvider extends ChangeNotifier {
default:
_themeMode = ThemeMode.system;
}
_colorSchemeIndex = prefs.colorSchemeIndex;
notifyListeners();
}
void setColorScheme(int index) {
if (_colorSchemeIndex != index) {
_colorSchemeIndex = index;
UserPrefs().setColorSchemeIndex(index);
notifyListeners();
}
}
void setMovieStatusIndex(int index) {
_movieStatusIndex = index;
notifyListeners();