docs(theme): update documentation and clean up deprecated color scheme definitions
Removed outdated compatibility aliases and deprecated methods from AppColorScheme, and updated CLAUDE.md to reflect new theme system requirements with centralized color management and no hard-coded values in UI components.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
import '../../../core/theme/app_color_scheme.dart';
|
||||
import '../../../core/theme/app_spacing.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../core/storage/local_storage.dart';
|
||||
|
||||
/// 引导页数据模型
|
||||
@@ -39,25 +41,25 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
title: '实时行情',
|
||||
description: '全球市场行情实时更新,把握每一个投资机会',
|
||||
imagePath: 'assets/images/onboarding_1.png', // 替换为你的图片
|
||||
gradientColors: [Color(0xFF6366F1), Color(0xFF8B5CF6)],
|
||||
gradientColors: [AppColorScheme.darkPrimary, AppColorScheme.darkPrimaryContainer],
|
||||
),
|
||||
_OnboardingItem(
|
||||
title: '模拟交易',
|
||||
description: '零风险体验真实交易,学习投资策略',
|
||||
imagePath: 'assets/images/onboarding_2.png', // 替换为你的图片
|
||||
gradientColors: [Color(0xFF10B981), Color(0xFF059669)],
|
||||
gradientColors: [AppColorScheme.darkTertiary, AppColorScheme.darkTertiaryContainer],
|
||||
),
|
||||
_OnboardingItem(
|
||||
title: '资产管理',
|
||||
description: '清晰的资产概览,轻松管理你的投资组合',
|
||||
imagePath: 'assets/images/onboarding_3.png', // 替换为你的图片
|
||||
gradientColors: [Color(0xFFF59E0B), Color(0xFFD97706)],
|
||||
gradientColors: [AppColorScheme.darkSecondary, AppColorScheme.darkSecondaryFixed],
|
||||
),
|
||||
_OnboardingItem(
|
||||
title: '安全可靠',
|
||||
description: '数据加密存储,保护你的隐私安全',
|
||||
imagePath: 'assets/images/onboarding_4.png', // 替换为你的图片
|
||||
gradientColors: [Color(0xFFEC4899), Color(0xFFBE185D)],
|
||||
gradientColors: [AppColorScheme.darkPrimaryFixed, AppColorScheme.darkPrimaryFixedDim],
|
||||
),
|
||||
];
|
||||
|
||||
@@ -110,9 +112,8 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
onPressed: _skip,
|
||||
child: Text(
|
||||
'跳过',
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.headlineMedium(context).copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -169,8 +170,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
),
|
||||
child: Text(
|
||||
_currentPage == _items.length - 1 ? '开始使用' : '下一步',
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
style: AppTextStyles.headlineLarge(context).copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -225,7 +225,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
return Icon(
|
||||
item.icon ?? LucideIcons.image,
|
||||
size: 72,
|
||||
color: Colors.white,
|
||||
color: AppColorScheme.darkOnPrimary,
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -233,7 +233,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
: Icon(
|
||||
item.icon ?? LucideIcons.star,
|
||||
size: 72,
|
||||
color: Colors.white,
|
||||
color: AppColorScheme.darkOnPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -241,8 +241,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
// 标题
|
||||
Text(
|
||||
item.title,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
style: AppTextStyles.displaySmall(context).copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.onSurface,
|
||||
letterSpacing: -0.5,
|
||||
@@ -253,8 +252,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
Text(
|
||||
item.description,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
style: AppTextStyles.headlineMedium(context).copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
height: 1.6,
|
||||
),
|
||||
@@ -275,7 +273,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: isActive ? colorScheme.primary : colorScheme.outlineVariant,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: BorderRadius.circular(AppRadius.sm),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user