加入新图标,优化通知栏,统计界面加入标签词云

This commit is contained in:
DelLevin-Home
2026-05-26 21:24:14 +08:00
parent 73f3795e65
commit daf66bd737
17 changed files with 766 additions and 403 deletions

View File

@@ -57,15 +57,21 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
super.initState();
WidgetsBinding.instance.addObserver(this);
widget.appProvider.loadThemeMode();
widget.appProvider.addListener(_onThemeChanged);
_updateSystemUI(widget.appProvider.themeMode);
}
@override
void dispose() {
widget.appProvider.removeListener(_onThemeChanged);
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
void _onThemeChanged() {
_updateSystemUI(widget.appProvider.themeMode);
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {
@@ -85,6 +91,8 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
}
final isDark = brightness == Brightness.dark;
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
systemNavigationBarColor: isDark ? const Color(0xFF1A1A1A) : Colors.white,
systemNavigationBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
));
@@ -100,7 +108,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
],
child: Consumer<AppProvider>(
builder: (context, provider, _) {
_updateSystemUI(provider.themeMode);
return MaterialApp(
title: 'MookNote',
debugShowCheckedModeBanner: false,