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:
@@ -3,10 +3,10 @@ import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import '../../../core/theme/app_color_scheme.dart';
|
||||
import '../../../core/theme/app_spacing.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../providers/auth_provider.dart';
|
||||
import '../../components/glass_panel.dart';
|
||||
import '../../components/neon_glow.dart';
|
||||
@@ -61,14 +61,11 @@ class _KycPageState extends State<KycPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: colorScheme.background,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: colorScheme.surface.withOpacity(0.0),
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
'实名认证',
|
||||
style: GoogleFonts.spaceGrotesk(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
style: AppTextStyles.headlineLarge(context),
|
||||
),
|
||||
leading: IconButton(
|
||||
icon: Icon(LucideIcons.chevronLeft, color: colorScheme.onSurface),
|
||||
@@ -111,19 +108,12 @@ class _KycPageState extends State<KycPage> {
|
||||
children: [
|
||||
Text(
|
||||
'身份验证',
|
||||
style: GoogleFonts.spaceGrotesk(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
style: AppTextStyles.headlineLarge(context),
|
||||
),
|
||||
SizedBox(height: 2),
|
||||
Text(
|
||||
'上传身份证正反面完成实名认证',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
style: AppTextStyles.bodyMedium(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -134,11 +124,7 @@ class _KycPageState extends State<KycPage> {
|
||||
// 身份证正面上传区
|
||||
Text(
|
||||
'身份证正面(人像面)',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
style: AppTextStyles.headlineSmall(context),
|
||||
),
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
_buildUploadZone(
|
||||
@@ -153,11 +139,7 @@ class _KycPageState extends State<KycPage> {
|
||||
// 身份证反面上传区
|
||||
Text(
|
||||
'身份证反面(国徽面)',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
style: AppTextStyles.headlineSmall(context),
|
||||
),
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
_buildUploadZone(
|
||||
@@ -206,8 +188,7 @@ class _KycPageState extends State<KycPage> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
'您的身份信息将被加密存储,仅用于身份验证',
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
style: AppTextStyles.bodySmall(context).copyWith(
|
||||
color: AppColorScheme.up.withOpacity(0.8),
|
||||
),
|
||||
),
|
||||
@@ -266,10 +247,10 @@ class _KycPageState extends State<KycPage> {
|
||||
|
||||
if (isDone || isComplete) {
|
||||
circleColor = AppColorScheme.up;
|
||||
textColor = Colors.white;
|
||||
textColor = colorScheme.onPrimary;
|
||||
} else if (isActive) {
|
||||
circleColor = colorScheme.primary;
|
||||
textColor = Colors.white;
|
||||
textColor = colorScheme.onPrimary;
|
||||
} else {
|
||||
circleColor = colorScheme.surfaceContainerHigh;
|
||||
textColor = colorScheme.onSurfaceVariant;
|
||||
@@ -289,9 +270,7 @@ class _KycPageState extends State<KycPage> {
|
||||
? Icon(LucideIcons.check, size: 16, color: textColor)
|
||||
: Text(
|
||||
number,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
style: AppTextStyles.headlineMedium(context).copyWith(
|
||||
color: textColor,
|
||||
),
|
||||
),
|
||||
@@ -300,10 +279,7 @@ class _KycPageState extends State<KycPage> {
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
style: AppTextStyles.bodySmall(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -332,7 +308,7 @@ class _KycPageState extends State<KycPage> {
|
||||
border: Border.all(
|
||||
color: hasImage
|
||||
? AppColorScheme.up.withOpacity(0.3)
|
||||
: Colors.transparent,
|
||||
: colorScheme.surface.withOpacity(0.0),
|
||||
),
|
||||
),
|
||||
child: hasImage
|
||||
@@ -359,8 +335,8 @@ class _KycPageState extends State<KycPage> {
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
Colors.black54,
|
||||
const Color(0x00000000),
|
||||
const Color(0x8A000000),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.only(
|
||||
@@ -373,10 +349,8 @@ class _KycPageState extends State<KycPage> {
|
||||
children: [
|
||||
Text(
|
||||
'$label已选择',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
style: AppTextStyles.labelLarge(context).copyWith(
|
||||
color: colorScheme.onPrimary,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
@@ -394,13 +368,13 @@ class _KycPageState extends State<KycPage> {
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white24,
|
||||
color: colorScheme.onSurface.withOpacity(0.24),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
LucideIcons.x,
|
||||
size: 14,
|
||||
color: Colors.white,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -427,16 +401,14 @@ class _KycPageState extends State<KycPage> {
|
||||
SizedBox(height: AppSpacing.sm),
|
||||
Text(
|
||||
'点击上传$label',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
style: AppTextStyles.bodyLarge(context).copyWith(
|
||||
color: colorScheme.onSurfaceVariant.withOpacity(0.6),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
'支持 JPG、PNG 格式',
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
style: AppTextStyles.bodySmall(context).copyWith(
|
||||
color: colorScheme.onSurfaceVariant.withOpacity(0.4),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user