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, ), ); } }