深色模式代码第二轮补充

This commit is contained in:
2026-10-11 16:03:06 +08:00
parent 1d033670f7
commit 7989495521
10 changed files with 198 additions and 209 deletions
+11
View File
@@ -45,6 +45,17 @@ class MyApp extends StatelessWidget {
brightness: brightness,
),
extensions: [colors], // 🆕 注册 ThemeExtension
appBarTheme: AppBarTheme(
backgroundColor: colors.background, // ← 关键:和 Scaffold 一致
foregroundColor: colors.textPrimary,
surfaceTintColor: Colors.transparent, // ← 关掉 M3 的滑动变色
elevation: 0,
scrolledUnderElevation: 0,
shadowColor: Colors.transparent,
iconTheme: IconThemeData(color: colors.textPrimary),
),
textTheme: TextTheme(
displayMedium: TextStyle(
fontFamily: 'HarmonyOS_Sans_SC',