docs: relocate skills system documentation and refactor asset page components
Move skills system documentation from bottom to top of CLAUDE.md for better organization. Refactor Flutter asset page by extracting UI components into separate files and updating import structure for improved modularity.
This commit is contained in:
@@ -7,7 +7,6 @@ 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' show AppRadius;
|
||||
import '../../../core/utils/toast_utils.dart';
|
||||
import '../../../core/event/app_event_bus.dart';
|
||||
import '../../../providers/asset_provider.dart';
|
||||
@@ -52,36 +51,48 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
context.read<AssetProvider>().loadFundOrders(type: type);
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// 主题辅助
|
||||
// ============================================
|
||||
|
||||
bool get _isDark => Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
/// 一次性获取所有主题感知颜色
|
||||
_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
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final bgColor = isDark
|
||||
? AppColorScheme.darkBackground
|
||||
: AppColorScheme.lightBackground;
|
||||
final c = _colors;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
backgroundColor: c.background,
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(LucideIcons.arrowLeft, size: 20),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: Text(
|
||||
'充提记录',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
backgroundColor: bgColor,
|
||||
title: Text('充提记录', style: _inter(fontSize: 16, fontWeight: FontWeight.w600, color: c.primaryText)),
|
||||
backgroundColor: c.background,
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
centerTitle: true,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_buildFilterTabs(context, isDark),
|
||||
Expanded(child: _buildOrderList(context, isDark)),
|
||||
_buildFilterTabs(),
|
||||
Expanded(child: _buildOrderList()),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -90,13 +101,8 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Filter Tabs - pill-style segmented control
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildFilterTabs(BuildContext context, bool isDark) {
|
||||
final bgColor = isDark
|
||||
? AppColorScheme.darkSurfaceContainerHigh
|
||||
: AppColorScheme.lightSurfaceHigh;
|
||||
final activeBgColor = isDark
|
||||
? AppColorScheme.darkOnSurface
|
||||
: Colors.white;
|
||||
Widget _buildFilterTabs() {
|
||||
final c = _colors;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md),
|
||||
@@ -104,33 +110,23 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
height: 40,
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
color: c.tabBg,
|
||||
borderRadius: AppRadius.radiusMd,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
_buildPillTab('全部', 0, activeBgColor, isDark),
|
||||
_buildPillTab('充值', 1, activeBgColor, isDark),
|
||||
_buildPillTab('提现', 2, activeBgColor, isDark),
|
||||
_buildPillTab('全部', 0),
|
||||
_buildPillTab('充值', 1),
|
||||
_buildPillTab('提现', 2),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPillTab(
|
||||
String label,
|
||||
int index,
|
||||
Color activeBgColor,
|
||||
bool isDark,
|
||||
) {
|
||||
Widget _buildPillTab(String label, int index) {
|
||||
final c = _colors;
|
||||
final isActive = _activeTab == index;
|
||||
final activeTextColor = isDark
|
||||
? AppColorScheme.darkBackground
|
||||
: AppColorScheme.lightOnSurface;
|
||||
final inactiveTextColor = isDark
|
||||
? AppColorScheme.darkOnSurfaceVariant
|
||||
: AppColorScheme.lightOnSurfaceVariant;
|
||||
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
@@ -142,16 +138,16 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isActive ? activeBgColor : Colors.transparent,
|
||||
color: isActive ? c.activeTabBg : Colors.transparent,
|
||||
borderRadius: AppRadius.radiusSm,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
label,
|
||||
style: GoogleFonts.inter(
|
||||
style: _inter(
|
||||
fontSize: 14,
|
||||
fontWeight: isActive ? FontWeight.w600 : FontWeight.w500,
|
||||
color: isActive ? activeTextColor : inactiveTextColor,
|
||||
color: isActive ? c.activeTabText : c.inactiveTabText,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -163,7 +159,9 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Order List
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildOrderList(BuildContext context, bool isDark) {
|
||||
Widget _buildOrderList() {
|
||||
final c = _colors;
|
||||
|
||||
return Consumer<AssetProvider>(
|
||||
builder: (context, provider, _) {
|
||||
final orders = provider.fundOrders;
|
||||
@@ -178,23 +176,9 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
LucideIcons.inbox,
|
||||
size: 64,
|
||||
color: isDark
|
||||
? AppColorScheme.darkOnSurfaceMuted
|
||||
: AppColorScheme.lightOnSurfaceMuted,
|
||||
),
|
||||
Icon(LucideIcons.inbox, size: 64, color: c.mutedText),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'暂无订单记录',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 14,
|
||||
color: isDark
|
||||
? AppColorScheme.darkOnSurfaceVariant
|
||||
: AppColorScheme.lightOnSurfaceVariant,
|
||||
),
|
||||
),
|
||||
Text('暂无订单记录', style: _inter(fontSize: 14, fontWeight: FontWeight.normal, color: c.secondaryText)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -207,7 +191,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
itemCount: orders.length,
|
||||
separatorBuilder: (_, __) => const SizedBox(height: 12),
|
||||
itemBuilder: (context, index) {
|
||||
return _buildOrderCard(orders[index], isDark);
|
||||
return _buildOrderCard(orders[index]);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -218,52 +202,35 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Order Card
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildOrderCard(OrderFund order, bool isDark) {
|
||||
final cardBg = isDark
|
||||
? AppColorScheme.darkSurfaceContainer
|
||||
: AppColorScheme.lightSurfaceLowest;
|
||||
final borderColor = isDark
|
||||
? AppColorScheme.darkOutlineVariant.withValues(alpha: 0.15)
|
||||
: AppColorScheme.lightOutlineVariant.withValues(alpha: 0.5);
|
||||
final primaryText = isDark
|
||||
? AppColorScheme.darkOnSurface
|
||||
: AppColorScheme.lightOnSurface;
|
||||
final mutedText = isDark
|
||||
? AppColorScheme.darkOnSurfaceMuted
|
||||
: AppColorScheme.lightOnSurfaceMuted;
|
||||
Widget _buildOrderCard(OrderFund order) {
|
||||
final c = _colors;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: cardBg,
|
||||
color: c.cardBg,
|
||||
borderRadius: AppRadius.radiusLg,
|
||||
border: Border.all(color: borderColor, width: 1),
|
||||
border: Border.all(color: c.borderColor, width: 1),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Header: type badge + status badge
|
||||
_buildCardHeader(order, isDark),
|
||||
_buildCardHeader(order),
|
||||
const SizedBox(height: 12),
|
||||
// Amount
|
||||
_buildAmountRow(order, primaryText),
|
||||
_buildAmountRow(order),
|
||||
const SizedBox(height: 12),
|
||||
// Detail rows
|
||||
_buildDetailRows(order, primaryText, mutedText),
|
||||
// Rejection reason
|
||||
_buildDetailRows(order),
|
||||
if (order.rejectReason != null) ...[
|
||||
const SizedBox(height: 8),
|
||||
_buildRejectionReason(order),
|
||||
],
|
||||
// Payable amount (withdrawal with fee)
|
||||
if (order.receivableAmount != null && !order.isDeposit) ...[
|
||||
const SizedBox(height: 8),
|
||||
_buildPayableRow(order, isDark, primaryText),
|
||||
_buildPayableRow(order),
|
||||
],
|
||||
// Action buttons
|
||||
if (order.canCancel || order.canConfirmPay) ...[
|
||||
const SizedBox(height: 12),
|
||||
_buildActions(order, isDark),
|
||||
_buildActions(order),
|
||||
],
|
||||
],
|
||||
),
|
||||
@@ -273,30 +240,28 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Card Header - type badge + status badge
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildCardHeader(OrderFund order, bool isDark) {
|
||||
final upColor = AppColorScheme.getUpColor(isDark);
|
||||
final downColor = AppColorScheme.getDownColor(isDark);
|
||||
final upBg = AppColorScheme.getUpBackgroundColor(isDark, opacity: 0.12);
|
||||
final downBg = AppColorScheme.getDownBackgroundColor(isDark, opacity: 0.12);
|
||||
Widget _buildCardHeader(OrderFund order) {
|
||||
final upColor = AppColorScheme.getUpColor(_isDark);
|
||||
final downColor = AppColorScheme.getDownColor(_isDark);
|
||||
final upBg = AppColorScheme.getUpBackgroundColor(_isDark, opacity: 0.12);
|
||||
final downBg = AppColorScheme.getDownBackgroundColor(_isDark, opacity: 0.12);
|
||||
final typeColor = order.isDeposit ? upColor : downColor;
|
||||
final typeBg = order.isDeposit ? upBg : downBg;
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Type badge (充值 / 提现)
|
||||
_buildBadge(order.typeText, typeColor, typeBg),
|
||||
// Status badge
|
||||
_buildStatusBadge(order, isDark),
|
||||
_buildStatusBadge(order),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatusBadge(OrderFund order, bool isDark) {
|
||||
final upColor = AppColorScheme.getUpColor(isDark);
|
||||
final downColor = AppColorScheme.getDownColor(isDark);
|
||||
final upBg = AppColorScheme.getUpBackgroundColor(isDark, opacity: 0.12);
|
||||
final downBg = AppColorScheme.getDownBackgroundColor(isDark, opacity: 0.12);
|
||||
Widget _buildStatusBadge(OrderFund order) {
|
||||
final upColor = AppColorScheme.getUpColor(_isDark);
|
||||
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);
|
||||
|
||||
@@ -345,86 +310,63 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: Text(
|
||||
text,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: textColor,
|
||||
),
|
||||
),
|
||||
child: Text(text, style: _inter(fontSize: 11, fontWeight: FontWeight.w600, color: textColor)),
|
||||
);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Amount Row
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildAmountRow(OrderFund order, Color primaryText) {
|
||||
Widget _buildAmountRow(OrderFund order) {
|
||||
final c = _colors;
|
||||
return Text(
|
||||
'${order.isDeposit ? '+' : '-'}${order.amount} USDT',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: primaryText,
|
||||
),
|
||||
style: _inter(fontSize: 18, fontWeight: FontWeight.w700, color: c.primaryText),
|
||||
);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Detail Rows
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildDetailRows(
|
||||
OrderFund order,
|
||||
Color primaryText,
|
||||
Color mutedText,
|
||||
) {
|
||||
Widget _buildDetailRows(OrderFund order) {
|
||||
final c = _colors;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
// Order number
|
||||
_buildDetailRow('订单号', order.orderNo, primaryText, mutedText),
|
||||
_buildDetailRow('订单号', order.orderNo, c),
|
||||
const SizedBox(height: 6),
|
||||
// Network / wallet address
|
||||
if (order.walletAddress != null) ...[
|
||||
_buildDetailRow(
|
||||
'网络',
|
||||
order.remark.isNotEmpty ? order.remark : '-',
|
||||
primaryText,
|
||||
mutedText,
|
||||
c,
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
_buildDetailRow(
|
||||
'地址',
|
||||
_truncateAddress(order.walletAddress!),
|
||||
primaryText,
|
||||
mutedText,
|
||||
c,
|
||||
trailing: GestureDetector(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: order.walletAddress!));
|
||||
ToastUtils.show('地址已复制');
|
||||
},
|
||||
child: Icon(
|
||||
LucideIcons.copy,
|
||||
size: 14,
|
||||
color: mutedText,
|
||||
),
|
||||
child: Icon(LucideIcons.copy, size: 14, color: c.mutedText),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
] else if (order.remark.isNotEmpty) ...[
|
||||
_buildDetailRow('网络', order.remark, primaryText, mutedText),
|
||||
_buildDetailRow('网络', order.remark, c),
|
||||
const SizedBox(height: 6),
|
||||
],
|
||||
// Fee (withdrawal)
|
||||
if (order.fee != null && !order.isDeposit) ...[
|
||||
_buildDetailRow('手续费', '${order.fee}%', primaryText, mutedText),
|
||||
_buildDetailRow('手续费', '${order.fee}%', c),
|
||||
const SizedBox(height: 6),
|
||||
],
|
||||
// Time
|
||||
_buildDetailRow(
|
||||
'时间',
|
||||
_formatTime(order.createTime),
|
||||
primaryText,
|
||||
mutedText,
|
||||
c,
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -433,46 +375,26 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
Widget _buildDetailRow(
|
||||
String label,
|
||||
String value,
|
||||
Color primaryText,
|
||||
Color mutedText, {
|
||||
_OrderColors c, {
|
||||
Widget? trailing,
|
||||
}) {
|
||||
final valueStyle = _inter(fontSize: 12, fontWeight: FontWeight.normal, color: c.primaryText);
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: mutedText,
|
||||
),
|
||||
),
|
||||
Text(label, style: _inter(fontSize: 12, fontWeight: FontWeight.normal, color: c.mutedText)),
|
||||
if (trailing != null)
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: primaryText,
|
||||
),
|
||||
),
|
||||
Text(value, style: valueStyle),
|
||||
const SizedBox(width: 4),
|
||||
trailing,
|
||||
],
|
||||
)
|
||||
else
|
||||
Text(
|
||||
value,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: primaryText,
|
||||
),
|
||||
),
|
||||
Text(value, style: valueStyle),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -481,57 +403,29 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// Rejection Reason
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildRejectionReason(OrderFund order) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
return Text(
|
||||
'拒绝原因: ${order.rejectReason}',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColorScheme.getDownColor(isDark),
|
||||
),
|
||||
style: _inter(fontSize: 12, fontWeight: FontWeight.normal, color: AppColorScheme.getDownColor(_isDark)),
|
||||
);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Payable Amount Row (withdrawal)
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildPayableRow(
|
||||
OrderFund order,
|
||||
bool isDark,
|
||||
Color primaryText,
|
||||
) {
|
||||
final bgTertiary = isDark
|
||||
? AppColorScheme.darkSurfaceContainerHigh
|
||||
: AppColorScheme.lightSurfaceHigh;
|
||||
final secondaryText = isDark
|
||||
? AppColorScheme.darkOnSurfaceVariant
|
||||
: AppColorScheme.lightOnSurfaceVariant;
|
||||
Widget _buildPayableRow(OrderFund order) {
|
||||
final c = _colors;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: bgTertiary,
|
||||
color: c.bgTertiary,
|
||||
borderRadius: AppRadius.radiusSm,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'应付金额',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: secondaryText,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${order.receivableAmount} USDT',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: primaryText,
|
||||
),
|
||||
),
|
||||
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)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -540,9 +434,9 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Action Buttons
|
||||
// ---------------------------------------------------------------------------
|
||||
Widget _buildActions(OrderFund order, bool isDark) {
|
||||
final upColor = AppColorScheme.getUpColor(isDark);
|
||||
final downColor = AppColorScheme.getDownColor(isDark);
|
||||
Widget _buildActions(OrderFund order) {
|
||||
final upColor = AppColorScheme.getUpColor(_isDark);
|
||||
final downColor = AppColorScheme.getDownColor(_isDark);
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
@@ -556,14 +450,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
borderRadius: AppRadius.radiusSm,
|
||||
border: Border.all(color: downColor, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
'取消订单',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: downColor,
|
||||
),
|
||||
),
|
||||
child: Text('取消订单', style: _inter(fontSize: 13, fontWeight: FontWeight.w500, color: downColor)),
|
||||
),
|
||||
),
|
||||
if (order.canCancel && order.canConfirmPay)
|
||||
@@ -577,14 +464,7 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
color: upColor,
|
||||
borderRadius: AppRadius.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
'已打款',
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
child: Text('已打款', style: _inter(fontSize: 13, fontWeight: FontWeight.w500, color: Colors.white)),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -663,3 +543,37 @@ class _FundOrdersPageState extends State<FundOrdersPage> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// 充提订单页面的主题感知颜色集合
|
||||
class _OrderColors {
|
||||
final Color background;
|
||||
final Color cardBg;
|
||||
final Color borderColor;
|
||||
final Color bgTertiary;
|
||||
final Color primaryText;
|
||||
final Color secondaryText;
|
||||
final Color mutedText;
|
||||
final Color tabBg;
|
||||
final Color activeTabBg;
|
||||
final Color activeTabText;
|
||||
final Color inactiveTabText;
|
||||
|
||||
_OrderColors(bool isDark)
|
||||
: background = isDark ? AppColorScheme.darkBackground : AppColorScheme.lightBackground,
|
||||
cardBg = isDark ? AppColorScheme.darkSurfaceContainer : AppColorScheme.lightSurfaceLowest,
|
||||
borderColor = isDark
|
||||
? AppColorScheme.darkOutlineVariant.withValues(alpha: 0.15)
|
||||
: AppColorScheme.lightOutlineVariant.withValues(alpha: 0.5),
|
||||
bgTertiary = isDark
|
||||
? AppColorScheme.darkSurfaceContainerHigh
|
||||
: AppColorScheme.lightSurfaceHigh,
|
||||
primaryText = isDark ? AppColorScheme.darkOnSurface : AppColorScheme.lightOnSurface,
|
||||
secondaryText = isDark
|
||||
? AppColorScheme.darkOnSurfaceVariant
|
||||
: AppColorScheme.lightOnSurfaceVariant,
|
||||
mutedText = isDark ? AppColorScheme.darkOnSurfaceMuted : AppColorScheme.lightOnSurfaceMuted,
|
||||
tabBg = isDark ? AppColorScheme.darkSurfaceContainerHigh : AppColorScheme.lightSurfaceHigh,
|
||||
activeTabBg = isDark ? AppColorScheme.darkOnSurface : Colors.white,
|
||||
activeTabText = isDark ? AppColorScheme.darkBackground : AppColorScheme.lightOnSurface,
|
||||
inactiveTabText = isDark ? AppColorScheme.darkOnSurfaceVariant : AppColorScheme.lightOnSurfaceVariant;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user