This commit is contained in:
sion
2026-04-07 01:05:05 +08:00
parent edad10ff06
commit 5ca1274607
83 changed files with 1561 additions and 1241 deletions

View File

@@ -4,13 +4,13 @@ import 'package:flutter_animate/flutter_animate.dart';
import '../../core/theme/app_spacing.dart';
import '../../core/theme/app_theme_extension.dart';
/// 资产卡片件 - 用于显示资产总览
/// 資產卡片件 - 用於顯示資產總覽
///
/// 设计规则 ("The Kinetic Vault"):
/// - 渐变背景: Neon Blue → Electric Purple
/// - 角: xl (16px)
/// - 无边框,使用渐变层
/// - 微妙影: 10% black, blur 10px
/// 設計規則 ("The Kinetic Vault"):
/// - 漸變背景: Neon Blue → Electric Purple
/// - 角: xl (16px)
/// - 無邊框,使用漸變層
/// - 微妙影: 10% black, blur 10px
class AssetCard extends StatelessWidget {
final String title;
final String balance;
@@ -23,7 +23,7 @@ class AssetCard extends StatelessWidget {
const AssetCard({
super.key,
this.title = '总资产',
this.title = '總資產',
required this.balance,
this.subtitle,
this.profit,
@@ -40,7 +40,7 @@ class AssetCard extends StatelessWidget {
final appColors = context.appColors;
final cardGradient = gradient ?? appColors.assetGradient;
// 主感知色 - 在渐变背景上使用 onPrimary
// 主感知色 - 在漸變背景上使用 onPrimary
final primaryTextColor = colorScheme.onPrimary;
final secondaryTextColor = colorScheme.onPrimary.withValues(alpha: 0.7);
@@ -63,7 +63,7 @@ class AssetCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 标题
// 標題
Row(
children: [
Text(
@@ -80,7 +80,7 @@ class AssetCard extends StatelessWidget {
],
),
const SizedBox(height: AppSpacing.sm),
// 余额 - 大标题
// 餘額 - 大標題
Text(
balance,
style: theme.textTheme.h1.copyWith(
@@ -89,7 +89,7 @@ class AssetCard extends StatelessWidget {
fontSize: 20,
),
),
// 盈信息
// 盈信息
if (profit != null) ...[
const SizedBox(height: AppSpacing.md),
Row(
@@ -101,13 +101,13 @@ class AssetCard extends StatelessWidget {
),
const SizedBox(width: 6),
Text(
': $profit',
': $profit',
style: theme.textTheme.small.copyWith(color: secondaryTextColor),
),
],
),
],
// 子
// 子
if (items != null && items!.isNotEmpty) ...[
const SizedBox(height: AppSpacing.lg),
Row(
@@ -143,7 +143,7 @@ class AssetCard extends StatelessWidget {
}
}
/// 资产子项
/// 資產子項
class AssetItem {
final String label;
final String value;
@@ -154,12 +154,12 @@ class AssetItem {
});
}
/// 简洁资产卡片 - 用列表中
/// 簡潔資產卡片 - 用列表中
///
/// 设计规则:
/// - 使用 surface 次而非
/// - 角: xl (16px)
/// - 涨跌标签: 15% 透明度背景
/// 設計規則:
/// - 使用 surface 次而非
/// - 角: xl (16px)
/// - 漲跌標籤: 15% 透明度背景
class AssetCardCompact extends StatelessWidget {
final String title;
final String balance;