登录流程已全部重构
This commit is contained in:
@@ -1,30 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
///颜色
|
||||
final scheme = ColorScheme.fromSeed(
|
||||
primary: Color(0xff3784f1),
|
||||
seedColor: Color(0xff3885f2),
|
||||
brightness: Brightness.light,
|
||||
//卡片色
|
||||
surface: Colors.white,
|
||||
surfaceContainerLow: Color(0xFFF4F8FB),
|
||||
surfaceContainer: Color(0xFFE9ECF3),
|
||||
surfaceContainerHigh: Color(0xFFDDE2EA),
|
||||
//颜色
|
||||
onSurfaceVariant: Color(0xFF828282),
|
||||
import 'base/app_colors_base.dart';
|
||||
import 'base/app_text_style.dart';
|
||||
import 'base/app_theme_ext.dart';
|
||||
|
||||
shadow: Color.fromRGBO(0, 0, 0, 0.1),
|
||||
);
|
||||
class AppTheme {
|
||||
static ThemeData createTheme(AppColorsBase themeBase) {
|
||||
final textTheme = buildTextTheme(themeBase);
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
primaryColor: themeBase.primary,
|
||||
scaffoldBackgroundColor: themeBase.surfaceContainerHigh,
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: themeBase.primary,
|
||||
secondary: themeBase.secondary,
|
||||
primary: themeBase.primary,
|
||||
brightness: Brightness.light,
|
||||
|
||||
///字体
|
||||
final textTheme = TextTheme(
|
||||
titleLarge: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: scheme.onSurface),
|
||||
titleMedium: TextStyle(fontSize: 20, fontWeight: FontWeight.w700, color: scheme.onSurface),
|
||||
titleSmall: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: scheme.onSurface),
|
||||
bodyLarge: TextStyle(fontSize: 18),
|
||||
bodyMedium: TextStyle(fontSize: 16),
|
||||
bodySmall: TextStyle(fontSize: 14),
|
||||
labelLarge: TextStyle(fontSize: 16, color: scheme.onSurfaceVariant),
|
||||
labelMedium: TextStyle(fontSize: 14, color: scheme.onSurfaceVariant),
|
||||
labelSmall: TextStyle(fontSize: 12, color: scheme.onSurfaceVariant),
|
||||
);
|
||||
onSurfaceVariant: themeBase.textSecondary,
|
||||
//背景色
|
||||
surfaceContainerHigh: themeBase.surfaceContainerHigh,
|
||||
surfaceContainer: themeBase.surfaceContainer,
|
||||
surfaceContainerLow: themeBase.surfaceContainerLow,
|
||||
surfaceContainerLowest: themeBase.surfaceContainerLowest,
|
||||
),
|
||||
textTheme: textTheme,
|
||||
extensions: [AppThemeExtension.fromColors(themeBase)],
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: Colors.white,
|
||||
titleTextStyle: textTheme.titleMedium,
|
||||
scrolledUnderElevation: 0,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// background = Color(0xFFFFFBFE); // 页面背景
|
||||
// surface = Color(0xFFFFFFFF); // 卡片背景
|
||||
// surfaceVariant = Color(0xFFFFF7E0); // 卡片高亮 / 强调背景
|
||||
// surfaceTint = Color(0xFFFFEF97); // 可用于叠加高亮
|
||||
// primaryContainer = Color(0xFFFFF8B0); // 小块强调背景
|
||||
// secondaryContainer= Color(0xFFE3E5C0); // 次要强调
|
||||
|
||||
Reference in New Issue
Block a user