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:
2026-04-05 23:37:27 +08:00
parent 189609f337
commit f5ac578892
39 changed files with 20289 additions and 1260 deletions

View File

@@ -3,6 +3,7 @@ import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:provider/provider.dart';
import '../../../core/theme/app_spacing.dart';
import '../../../core/theme/app_color_scheme.dart';
import '../../../core/theme/app_theme.dart';
import '../../../data/models/order_models.dart';
import '../../../providers/asset_provider.dart';
@@ -97,20 +98,20 @@ class _FundOrderCard extends StatelessWidget {
children: [
Text(
'${isDeposit ? '+' : '-'}${order.amount} USDT',
style: theme.textTheme.large.copyWith(
style: AppTextStyles.headlineMedium(context).copyWith(
color: statusColor,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
),
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm - AppSpacing.xs, vertical: AppSpacing.xs / 2),
decoration: BoxDecoration(
color: statusColor.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
color: statusColor.withValues(alpha: 0.1),
borderRadius: AppRadius.radiusMd,
),
child: Text(
_getStatusText(order.status, isDeposit),
style: theme.textTheme.small.copyWith(color: statusColor),
style: AppTextStyles.labelMedium(context).copyWith(color: statusColor),
),
),
],
@@ -119,32 +120,32 @@ class _FundOrderCard extends StatelessWidget {
if (!isDeposit && order.fee != null) ...[
Row(
children: [
Text('手续费(10%): ', style: theme.textTheme.muted),
Text('-${order.fee} USDT', style: theme.textTheme.small),
Text('手续费(10%): ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text('-${order.fee} USDT', style: AppTextStyles.bodyMedium(context)),
],
),
SizedBox(height: AppSpacing.xs),
Row(
children: [
Text('应付款: ', style: theme.textTheme.muted),
Text('${order.receivableAmount ?? "0"} USDT', style: theme.textTheme.small.copyWith(fontWeight: FontWeight.bold)),
Text('应付款: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text('${order.receivableAmount ?? "0"} USDT', style: AppTextStyles.bodyMedium(context).copyWith(fontWeight: FontWeight.w700)),
],
),
SizedBox(height: AppSpacing.sm),
],
Row(
children: [
Text('订单号: ', style: theme.textTheme.muted),
Text(order.orderNo, style: theme.textTheme.small),
Text('订单号: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text(order.orderNo, style: AppTextStyles.bodyMedium(context)),
],
),
SizedBox(height: AppSpacing.xs),
Row(
children: [
Text('创建时间: ', style: theme.textTheme.muted),
Text('创建时间: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text(
order.createTime?.toString() ?? '',
style: theme.textTheme.small,
style: AppTextStyles.bodyMedium(context),
),
],
),
@@ -152,11 +153,11 @@ class _FundOrderCard extends StatelessWidget {
SizedBox(height: AppSpacing.xs),
Row(
children: [
Text('驳回原因: ', style: theme.textTheme.muted),
Text('驳回原因: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Expanded(
child: Text(
order.rejectReason!,
style: theme.textTheme.small.copyWith(color: AppColorScheme.error),
style: AppTextStyles.bodyMedium(context).copyWith(color: AppColorScheme.error),
),
),
],
@@ -192,7 +193,7 @@ class _FundOrderCard extends StatelessWidget {
if (context.mounted) {
if (response.success) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: const Text('已确认打款,请等待审核')),
const SnackBar(content: Text('已确认打款,请等待审核')),
);
context.read<AssetProvider>().loadFundOrders();
} else {
@@ -208,7 +209,7 @@ class _FundOrderCard extends StatelessWidget {
if (context.mounted) {
if (response.success) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: const Text('订单已取消')),
const SnackBar(content: Text('订单已取消')),
);
context.read<AssetProvider>().loadFundOrders();
} else {

View File

@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:provider/provider.dart';
import '../../../core/theme/app_color_scheme.dart';
import '../../../core/theme/app_spacing.dart';
import '../../../core/theme/app_theme.dart';
import '../../../providers/asset_provider.dart';
import '../../../data/models/order_models.dart';
import 'fund_order_card.dart';
@@ -86,34 +88,36 @@ class _FundOrderCardContent extends StatelessWidget {
const _FundOrderCardContent({required this.order});
bool get _isDark => true; // 默认深色
Color _getStatusColor(int status, bool isDeposit) {
if (isDeposit) {
switch (status) {
case 1:
return const Color(0xFFFF9800);
return AppColorScheme.warning;
case 2:
return const Color(0xFF2196F3);
return AppColorScheme.info;
case 3:
return const Color(0xFFafffd1);
return AppColorScheme.success;
case 4:
return const Color(0xFFff716c);
return AppColorScheme.error;
case 5:
return const Color(0xFFa9abb3);
return AppColorScheme.muted;
default:
return const Color(0xFFa9abb3);
return AppColorScheme.muted;
}
} else {
switch (status) {
case 1:
return const Color(0xFFFF9800);
return AppColorScheme.warning;
case 2:
return const Color(0xFFafffd1);
return AppColorScheme.success;
case 3:
return const Color(0xFFff716c);
return AppColorScheme.error;
case 4:
return const Color(0xFFa9abb3);
return AppColorScheme.muted;
default:
return const Color(0xFFa9abb3);
return AppColorScheme.muted;
}
}
}
@@ -155,6 +159,8 @@ class _FundOrderCardContent extends StatelessWidget {
final theme = ShadTheme.of(context);
final isDeposit = order.type == 1;
final statusColor = _getStatusColor(order.status, isDeposit);
final isDark = Theme.of(context).brightness == Brightness.dark;
final onPrimaryColor = isDark ? AppColorScheme.darkOnSurface : AppColorScheme.lightOnSurface;
return ShadCard(
padding: AppSpacing.cardPadding,
@@ -166,20 +172,20 @@ class _FundOrderCardContent extends StatelessWidget {
children: [
Text(
'${isDeposit ? '+' : '-'}${order.amount} USDT',
style: theme.textTheme.large.copyWith(
style: AppTextStyles.headlineMedium(context).copyWith(
color: statusColor,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
),
Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm - AppSpacing.xs, vertical: AppSpacing.xs / 2),
decoration: BoxDecoration(
color: statusColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
borderRadius: AppRadius.radiusMd,
),
child: Text(
_getStatusText(order.status, isDeposit),
style: theme.textTheme.small.copyWith(color: statusColor),
style: AppTextStyles.labelMedium(context).copyWith(color: statusColor),
),
),
],
@@ -187,17 +193,17 @@ class _FundOrderCardContent extends StatelessWidget {
SizedBox(height: AppSpacing.sm),
Row(
children: [
Text('订单号: ', style: theme.textTheme.muted),
Text(order.orderNo, style: theme.textTheme.small),
Text('订单号: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text(order.orderNo, style: AppTextStyles.bodyMedium(context)),
],
),
SizedBox(height: AppSpacing.xs),
Row(
children: [
Text('创建时间: ', style: theme.textTheme.muted),
Text('创建时间: ', style: AppTextStyles.bodyMedium(context).copyWith(color: theme.colorScheme.mutedForeground)),
Text(
order.createTime?.toString() ?? '',
style: theme.textTheme.small,
style: AppTextStyles.bodyMedium(context),
),
],
),
@@ -206,4 +212,3 @@ class _FundOrderCardContent extends StatelessWidget {
);
}
}

View File

@@ -1,12 +1,12 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:provider/provider.dart';
import '../../../core/theme/app_color_scheme.dart';
import '../../../core/theme/app_spacing.dart';
import '../../../core/theme/app_theme.dart';
import '../../../core/utils/toast_utils.dart';
import '../../../core/event/app_event_bus.dart';
import '../../../providers/asset_provider.dart';
@@ -60,14 +60,6 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
/// 一次性获取所有主题感知颜色
_OrderColors get _colors => _OrderColors(_isDark);
TextStyle _inter({
required double fontSize,
required FontWeight fontWeight,
required Color color,
}) {
return GoogleFonts.inter(fontSize: fontSize, fontWeight: fontWeight, color: color);
}
// ============================================
// 构建 UI
// ============================================
@@ -83,7 +75,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
icon: const Icon(LucideIcons.arrowLeft, size: 20),
onPressed: () => Navigator.of(context).pop(),
),
title: Text('充提记录', style: _inter(fontSize: 16, fontWeight: FontWeight.w600, color: c.primaryText)),
title: Text('充提记录', style: AppTextStyles.headlineLarge(context).copyWith(color: c.primaryText)),
backgroundColor: c.background,
elevation: 0,
scrolledUnderElevation: 0,
@@ -108,7 +100,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md),
child: Container(
height: 40,
padding: const EdgeInsets.all(3),
padding: const EdgeInsets.all(AppSpacing.xs),
decoration: BoxDecoration(
color: c.tabBg,
borderRadius: AppRadius.radiusMd,
@@ -138,17 +130,15 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
},
child: Container(
decoration: BoxDecoration(
color: isActive ? c.activeTabBg : Colors.transparent,
color: isActive ? c.activeTabBg : AppColorScheme.darkSurfaceLowest.withValues(alpha: 0),
borderRadius: AppRadius.radiusSm,
),
child: Center(
child: Text(
label,
style: _inter(
fontSize: 14,
fontWeight: isActive ? FontWeight.w600 : FontWeight.w500,
color: isActive ? c.activeTabText : c.inactiveTabText,
),
style: isActive
? AppTextStyles.headlineMedium(context).copyWith(color: c.activeTabText)
: AppTextStyles.headlineSmall(context).copyWith(color: c.inactiveTabText),
),
),
),
@@ -177,8 +167,8 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(LucideIcons.inbox, size: 64, color: c.mutedText),
const SizedBox(height: 16),
Text('暂无订单记录', style: _inter(fontSize: 14, fontWeight: FontWeight.normal, color: c.secondaryText)),
const SizedBox(height: AppSpacing.md),
Text('暂无订单记录', style: AppTextStyles.headlineMedium(context).copyWith(color: c.secondaryText)),
],
),
);
@@ -187,9 +177,9 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
return RefreshIndicator(
onRefresh: () async => _loadData(),
child: ListView.separated(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 32),
padding: const EdgeInsets.fromLTRB(AppSpacing.md, AppSpacing.md, AppSpacing.md, AppSpacing.xl),
itemCount: orders.length,
separatorBuilder: (_, __) => const SizedBox(height: 12),
separatorBuilder: (_, __) => const SizedBox(height: AppSpacing.sm + AppSpacing.xs),
itemBuilder: (context, index) {
return _buildOrderCard(orders[index]);
},
@@ -206,7 +196,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
final c = _colors;
return Container(
padding: const EdgeInsets.all(16),
padding: AppSpacing.cardPadding,
decoration: BoxDecoration(
color: c.cardBg,
borderRadius: AppRadius.radiusLg,
@@ -216,20 +206,20 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildCardHeader(order),
const SizedBox(height: 12),
const SizedBox(height: AppSpacing.sm + AppSpacing.xs),
_buildAmountRow(order),
const SizedBox(height: 12),
const SizedBox(height: AppSpacing.sm + AppSpacing.xs),
_buildDetailRows(order),
if (order.rejectReason != null) ...[
const SizedBox(height: 8),
const SizedBox(height: AppSpacing.sm),
_buildRejectionReason(order),
],
if (order.receivableAmount != null && !order.isDeposit) ...[
const SizedBox(height: 8),
const SizedBox(height: AppSpacing.sm),
_buildPayableRow(order),
],
if (order.canCancel || order.canConfirmPay) ...[
const SizedBox(height: 12),
const SizedBox(height: AppSpacing.sm + AppSpacing.xs),
_buildActions(order),
],
],
@@ -262,8 +252,6 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
final downColor = AppColorScheme.getDownColor(_isDark);
final upBg = AppColorScheme.getUpBackgroundColor(_isDark, opacity: 0.12);
final downBg = AppColorScheme.getDownBackgroundColor(_isDark, opacity: 0.12);
const amberColor = Color(0xFFD97706);
const amberBg = Color(0xFFFEF3C7);
Color bgColor;
Color textColor;
@@ -272,8 +260,8 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
switch (order.status) {
case 1: // 待付款
case 2: // 待确认
bgColor = amberBg;
textColor = amberColor;
bgColor = AppColorScheme.warning.withValues(alpha: 0.12);
textColor = AppColorScheme.warning;
break;
case 3: // 已完成
bgColor = upBg;
@@ -287,8 +275,8 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
switch (order.status) {
case 1: // 待审批
case 5: // 待财务审核
bgColor = amberBg;
textColor = amberColor;
bgColor = AppColorScheme.warning.withValues(alpha: 0.12);
textColor = AppColorScheme.warning;
break;
case 2: // 已完成
bgColor = upBg;
@@ -305,12 +293,12 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
Widget _buildBadge(String text, Color textColor, Color bgColor) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm, vertical: AppSpacing.xs),
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.circular(4),
borderRadius: AppRadius.radiusSm,
),
child: Text(text, style: _inter(fontSize: 11, fontWeight: FontWeight.w600, color: textColor)),
child: Text(text, style: AppTextStyles.labelSmall(context).copyWith(color: textColor)),
);
}
@@ -321,7 +309,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
final c = _colors;
return Text(
'${order.isDeposit ? '+' : '-'}${order.amount} USDT',
style: _inter(fontSize: 18, fontWeight: FontWeight.w700, color: c.primaryText),
style: AppTextStyles.displaySmall(context).copyWith(color: c.primaryText, height: 1.3),
);
}
@@ -334,14 +322,14 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
return Column(
children: [
_buildDetailRow('订单号', order.orderNo, c),
const SizedBox(height: 6),
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
if (order.walletAddress != null) ...[
_buildDetailRow(
'网络',
order.remark.isNotEmpty ? order.remark : '-',
c,
),
const SizedBox(height: 6),
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
_buildDetailRow(
'地址',
_truncateAddress(order.walletAddress!),
@@ -354,14 +342,14 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
child: Icon(LucideIcons.copy, size: 14, color: c.mutedText),
),
),
const SizedBox(height: 6),
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
] else if (order.remark.isNotEmpty) ...[
_buildDetailRow('网络', order.remark, c),
const SizedBox(height: 6),
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
],
if (order.fee != null && !order.isDeposit) ...[
_buildDetailRow('手续费', '${order.fee}%', c),
const SizedBox(height: 6),
const SizedBox(height: AppSpacing.sm - AppSpacing.xs),
],
_buildDetailRow(
'时间',
@@ -378,18 +366,18 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
_OrderColors c, {
Widget? trailing,
}) {
final valueStyle = _inter(fontSize: 12, fontWeight: FontWeight.normal, color: c.primaryText);
final valueStyle = AppTextStyles.bodyMedium(context).copyWith(color: c.primaryText);
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(label, style: _inter(fontSize: 12, fontWeight: FontWeight.normal, color: c.mutedText)),
Text(label, style: AppTextStyles.bodyMedium(context).copyWith(color: c.mutedText)),
if (trailing != null)
Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(value, style: valueStyle),
const SizedBox(width: 4),
const SizedBox(width: AppSpacing.xs),
trailing,
],
)
@@ -405,7 +393,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
Widget _buildRejectionReason(OrderFund order) {
return Text(
'拒绝原因: ${order.rejectReason}',
style: _inter(fontSize: 12, fontWeight: FontWeight.normal, color: AppColorScheme.getDownColor(_isDark)),
style: AppTextStyles.bodyMedium(context).copyWith(color: AppColorScheme.getDownColor(_isDark)),
);
}
@@ -416,7 +404,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
final c = _colors;
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.sm + AppSpacing.xs, vertical: AppSpacing.sm),
decoration: BoxDecoration(
color: c.bgTertiary,
borderRadius: AppRadius.radiusSm,
@@ -424,8 +412,8 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('应付金额', style: _inter(fontSize: 13, fontWeight: FontWeight.w500, color: c.secondaryText)),
Text('${order.receivableAmount} USDT', style: _inter(fontSize: 13, fontWeight: FontWeight.w600, color: c.primaryText)),
Text('应付金额', style: AppTextStyles.headlineSmall(context).copyWith(color: c.secondaryText)),
Text('${order.receivableAmount} USDT', style: AppTextStyles.headlineMedium(context).copyWith(color: c.primaryText)),
],
),
);
@@ -437,6 +425,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
Widget _buildActions(OrderFund order) {
final upColor = AppColorScheme.getUpColor(_isDark);
final downColor = AppColorScheme.getDownColor(_isDark);
final c = _colors;
return Row(
mainAxisAlignment: MainAxisAlignment.end,
@@ -445,26 +434,26 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
GestureDetector(
onTap: () => _cancelOrder(order),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md, vertical: AppSpacing.sm),
decoration: BoxDecoration(
borderRadius: AppRadius.radiusSm,
border: Border.all(color: downColor, width: 1),
),
child: Text('取消订单', style: _inter(fontSize: 13, fontWeight: FontWeight.w500, color: downColor)),
child: Text('取消订单', style: AppTextStyles.headlineSmall(context).copyWith(color: downColor)),
),
),
if (order.canCancel && order.canConfirmPay)
const SizedBox(width: 12),
const SizedBox(width: AppSpacing.sm + AppSpacing.xs),
if (order.canConfirmPay)
GestureDetector(
onTap: () => _confirmPay(order),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md, vertical: AppSpacing.sm),
decoration: BoxDecoration(
color: upColor,
borderRadius: AppRadius.radiusSm,
),
child: Text('已打款', style: _inter(fontSize: 13, fontWeight: FontWeight.w500, color: Colors.white)),
child: Text('已打款', style: AppTextStyles.headlineSmall(context).copyWith(color: c.activeTabText)),
),
),
],
@@ -573,7 +562,7 @@ class _OrderColors {
: AppColorScheme.lightOnSurfaceVariant,
mutedText = isDark ? AppColorScheme.darkOnSurfaceMuted : AppColorScheme.lightOnSurfaceMuted,
tabBg = isDark ? AppColorScheme.darkSurfaceContainerHigh : AppColorScheme.lightSurfaceHigh,
activeTabBg = isDark ? AppColorScheme.darkOnSurface : Colors.white,
activeTabBg = isDark ? AppColorScheme.darkOnSurface : AppColorScheme.lightSurfaceLowest,
activeTabText = isDark ? AppColorScheme.darkBackground : AppColorScheme.lightOnSurface,
inactiveTabText = isDark ? AppColorScheme.darkOnSurfaceVariant : AppColorScheme.lightOnSurfaceVariant;
}

View File

@@ -3,6 +3,7 @@ import 'package:shadcn_ui/shadcn_ui.dart';
import 'package:provider/provider.dart';
import '../../../core/theme/app_color_scheme.dart';
import '../../../core/theme/app_spacing.dart';
import '../../../core/theme/app_theme.dart';
import '../../../providers/asset_provider.dart';
import 'fund_orders_list.dart';
@@ -34,6 +35,7 @@ class _OrdersPageState extends State<OrdersPage> with AutomaticKeepAliveClientMi
Widget build(BuildContext context) {
super.build(context);
final theme = ShadTheme.of(context);
final isDark = Theme.of(context).brightness == Brightness.dark;
return Scaffold(
backgroundColor: theme.colorScheme.background,
@@ -82,12 +84,14 @@ class TabSelector extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
final isDark = Theme.of(context).brightness == Brightness.dark;
final onPrimaryBg = isDark ? AppColorScheme.darkBackground : AppColorScheme.lightSurfaceLowest;
return Container(
padding: EdgeInsets.all(AppSpacing.xs),
padding: const EdgeInsets.all(AppSpacing.xs),
decoration: BoxDecoration(
color: theme.colorScheme.card,
borderRadius: BorderRadius.circular(AppRadius.lg),
borderRadius: AppRadius.radiusLg,
),
child: Row(
children: tabs.asMap().entries.map((entry) {
@@ -102,16 +106,20 @@ class TabSelector extends StatelessWidget {
duration: const Duration(milliseconds: 200),
padding: EdgeInsets.symmetric(vertical: AppSpacing.sm + AppSpacing.xs),
decoration: BoxDecoration(
color: isSelected ? theme.colorScheme.primary : Colors.transparent,
borderRadius: BorderRadius.circular(AppRadius.md),
color: isSelected ? theme.colorScheme.primary : AppColorScheme.darkSurfaceLowest.withValues(alpha: 0),
borderRadius: AppRadius.radiusMd,
),
child: Center(
child: Text(
label,
style: TextStyle(
color: isSelected ? Colors.white : theme.colorScheme.mutedForeground,
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
),
style: isSelected
? AppTextStyles.labelLarge(context).copyWith(
color: onPrimaryBg,
)
: AppTextStyles.labelLarge(context).copyWith(
color: theme.colorScheme.mutedForeground,
fontWeight: FontWeight.w400,
),
),
),
),
@@ -132,8 +140,6 @@ class TradeOrdersList extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
// Trade orders feature not yet implemented in provider
// Using tradeAccounts (holdings) as placeholder for now
return Center(
child: Padding(