Files
plan_flutter/lib/config/theme/theme.dart
2025-09-04 10:16:11 +08:00

50 lines
1.3 KiB
Dart

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