初始化

This commit is contained in:
zhu
2026-03-10 13:36:40 +08:00
commit b03e64957c
111 changed files with 4536 additions and 0 deletions

42
lib/core/theme/theme.dart Normal file
View File

@@ -0,0 +1,42 @@
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: "资源圆体",
scaffoldBackgroundColor: themeBase.surfaceContainerHigh,
colorScheme: ColorScheme.fromSeed(
primary: themeBase.primaryStart,
seedColor: themeBase.primaryStart,
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,
),
);
}
}