This commit is contained in:
zhutao
2025-09-04 17:57:35 +08:00
parent 4d12f8afc2
commit 0231dcfe1a
34 changed files with 1339 additions and 368 deletions

49
lib/theme/theme.dart Normal file
View File

@@ -0,0 +1,49 @@
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(0xffbababa),
//颜色
onSurfaceVariant: Color(0xFFBEBEBE),
shadow: Color.fromRGBO(0, 0, 0, 0.1),
);
///字体
final textTheme = TextTheme(
titleLarge: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w700,
color: scheme.onSurface,
letterSpacing: 0.5,
),
titleMedium: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w700,
color: scheme.onSurface,
letterSpacing: 0.5,
),
titleSmall: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
color: scheme.onSurface,
letterSpacing: 0.5,
),
bodyLarge: TextStyle(fontSize: 18, letterSpacing: 0.5),
bodyMedium: TextStyle(
fontSize: 16,
letterSpacing: 0.5,
color: scheme.onSurface,
),
bodySmall: TextStyle(fontSize: 14, letterSpacing: 0.5),
labelLarge: TextStyle(fontSize: 16, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
labelMedium: TextStyle(fontSize: 14, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
labelSmall: TextStyle(fontSize: 12, color: scheme.onSurfaceVariant, letterSpacing: 0.5),
);