feat(ui): 优化所有页面使用现代设计系统

- 使用 AppSpacing 替换硬编码间距
- 使用 AppRadius 替换硬编码圆角
- 使用 withValues(alpha:) 替换 withOpacity
- 优化 login_page, home_page, market_page, trade_page, asset_page, mine_page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 15:37:59 +08:00
parent 51b2f30a1b
commit b40c9f8360
7 changed files with 172 additions and 162 deletions

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:provider/provider.dart';
import '../../../core/theme/app_spacing.dart';
import '../../../providers/auth_provider.dart';
import '../main/main_page.dart';
import 'register_page.dart';
@@ -29,7 +30,7 @@ class _LoginPageState extends State<LoginPage> {
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: _maxFormWidth),
child: Padding(
padding: const EdgeInsets.all(24),
padding: EdgeInsets.all(AppSpacing.lg),
child: ShadForm(
key: formKey,
child: Column(
@@ -37,13 +38,13 @@ class _LoginPageState extends State<LoginPage> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_buildHeader(theme),
const SizedBox(height: 48),
SizedBox(height: AppSpacing.xxl),
_buildUsernameField(),
const SizedBox(height: 16),
SizedBox(height: AppSpacing.md),
_buildPasswordField(),
const SizedBox(height: 24),
SizedBox(height: AppSpacing.lg),
_buildLoginButton(),
const SizedBox(height: 16),
SizedBox(height: AppSpacing.md),
_buildRegisterLink(theme),
],
),
@@ -62,13 +63,13 @@ class _LoginPageState extends State<LoginPage> {
size: _logoSize,
color: theme.colorScheme.primary,
),
const SizedBox(height: 24),
SizedBox(height: AppSpacing.lg),
Text(
'模拟所',
style: theme.textTheme.h1,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),
SizedBox(height: AppSpacing.sm),
Text(
'虚拟货币模拟交易平台',
style: theme.textTheme.muted,