111
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user