深色模式代码第二轮补充
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user