62 lines
2.1 KiB
Dart
62 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// UI 样式规范(《01-开发文档》5.4):深色沉浸 + 品牌红/青 + 会员金
|
|
class AppColors {
|
|
AppColors._();
|
|
|
|
static const Color background = Color(0xFF121212);
|
|
static const Color surface = Color(0xFF1E1E1E);
|
|
static const Color primary = Color(0xFFFE2C55); // 品牌红
|
|
static const Color secondary = Color(0xFF25F4EE); // 辅助青
|
|
static const Color textPrimary = Color(0xFFFFFFFF);
|
|
static const Color textSecondary = Color(0xFFB0B0B0);
|
|
static const Color textWeak = Color(0xFF6E6E6E);
|
|
static const Color gold = Color(0xFFF7D794);
|
|
static const Color goldDeep = Color(0xFFD4A017);
|
|
|
|
/// 会员金色渐变
|
|
static const LinearGradient goldGradient = LinearGradient(
|
|
colors: [gold, goldDeep],
|
|
);
|
|
}
|
|
|
|
/// 全局深色主题
|
|
class AppTheme {
|
|
AppTheme._();
|
|
|
|
static ThemeData get dark => ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: AppColors.background,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: AppColors.primary,
|
|
secondary: AppColors.secondary,
|
|
surface: AppColors.surface,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: AppColors.background,
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: AppColors.surface,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide.none,
|
|
),
|
|
hintStyle: const TextStyle(color: AppColors.textWeak),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: AppColors.primary,
|
|
foregroundColor: AppColors.textPrimary,
|
|
minimumSize: const Size.fromHeight(48),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
|
),
|
|
),
|
|
dividerColor: AppColors.textWeak.withValues(alpha: 0.2),
|
|
);
|
|
}
|