自习室优化ok
This commit is contained in:
41
lib/global/theme/theme.dart
Normal file
41
lib/global/theme/theme.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'base/app_colors_base.dart';
|
||||
import 'base/app_text_style.dart';
|
||||
import 'base/app_theme_ext.dart';
|
||||
|
||||
export 'themes/light_theme.dart';
|
||||
export 'base/app_theme_ext.dart';
|
||||
|
||||
class AppTheme {
|
||||
static ThemeData createTheme(AppColorsBase themeBase) {
|
||||
final textTheme = buildTextTheme(themeBase);
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
fontFamily: "资源圆体",
|
||||
primaryColor: themeBase.primary,
|
||||
scaffoldBackgroundColor: themeBase.surfaceContainerHigh,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: themeBase.primary,
|
||||
brightness: Brightness.light,
|
||||
onSurfaceVariant: themeBase.textSecondary,
|
||||
//背景色
|
||||
surfaceContainerHigh: themeBase.surfaceContainerHigh,
|
||||
surfaceContainer: themeBase.surfaceContainer,
|
||||
surfaceContainerLow: themeBase.surfaceContainerLow,
|
||||
surfaceContainerLowest: themeBase.surfaceContainerLowest,
|
||||
//阴影
|
||||
shadow: themeBase.shadow,
|
||||
),
|
||||
textTheme: textTheme,
|
||||
extensions: [AppThemeExtension(baseTheme: themeBase)],
|
||||
// pageTransitionsTheme: const PageTransitionsTheme(),
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: Colors.white,
|
||||
titleTextStyle: textTheme.titleMedium,
|
||||
scrolledUnderElevation: 0,
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user