From 9709986ff0139487399cdead34460c692ad811bf Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Wed, 24 Jun 2026 23:47:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(client):=20=E5=87=BA=E5=BA=93=E5=9F=9F?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=BF=81=E7=A7=BB=E5=88=B0=20context.tokens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- .../stock_out/stock_out_form_screen.dart | 114 +++++++++--------- .../stock_out/stock_out_list_screen.dart | 104 ++++++++-------- 2 files changed, 109 insertions(+), 109 deletions(-) diff --git a/client/lib/screens/stock_out/stock_out_form_screen.dart b/client/lib/screens/stock_out/stock_out_form_screen.dart index bce35b2..b78dc38 100644 --- a/client/lib/screens/stock_out/stock_out_form_screen.dart +++ b/client/lib/screens/stock_out/stock_out_form_screen.dart @@ -5,7 +5,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import '../../core/responsive/responsive.dart'; -import '../../core/theme/app_theme.dart'; +import '../../core/theme/context_tokens.dart'; import '../../core/auth/auth_state.dart'; import '../../core/utils/print_util.dart'; import '../../core/utils/date_util.dart'; @@ -173,7 +173,7 @@ class _StockOutFormScreenState extends ConsumerState { } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('加载失败:$e'), backgroundColor: AppTheme.danger), + SnackBar(content: Text('加载失败:$e'), backgroundColor: context.tokens.danger), ); } } finally { @@ -221,8 +221,8 @@ class _StockOutFormScreenState extends ConsumerState { Future _addItem() async { if (_warehouseId == null) { ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('请先选择出库仓库'), backgroundColor: AppTheme.danger), + SnackBar( + content: const Text('请先选择出库仓库'), backgroundColor: context.tokens.danger), ); return; } @@ -265,15 +265,15 @@ class _StockOutFormScreenState extends ConsumerState { if (!asDraft && !_formKey.currentState!.validate()) return; if (_warehouseId == null) { ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('请选择出库仓库'), backgroundColor: AppTheme.danger), + SnackBar( + content: const Text('请选择出库仓库'), backgroundColor: context.tokens.danger), ); return; } if (_items.isEmpty) { ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('请添加商品明细'), backgroundColor: AppTheme.danger), + SnackBar( + content: const Text('请添加商品明细'), backgroundColor: context.tokens.danger), ); return; } @@ -283,7 +283,7 @@ class _StockOutFormScreenState extends ConsumerState { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('第 ${invalidQtyIndex + 1} 行数量必须大于 0'), - backgroundColor: AppTheme.danger, + backgroundColor: context.tokens.danger, ), ); return; @@ -326,7 +326,7 @@ class _StockOutFormScreenState extends ConsumerState { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text(asDraft ? '已保存为草稿' : '出库单已提交审核'), - backgroundColor: AppTheme.success, + backgroundColor: context.tokens.success, ), ); context.go('/stock-out'); @@ -334,7 +334,7 @@ class _StockOutFormScreenState extends ConsumerState { } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('操作失败:$e'), backgroundColor: AppTheme.danger), + SnackBar(content: Text('操作失败:$e'), backgroundColor: context.tokens.danger), ); } } finally { @@ -372,7 +372,7 @@ class _StockOutFormScreenState extends ConsumerState { ), TextButton( onPressed: () => Navigator.of(ctx).pop('discard'), - child: const Text('放弃', style: TextStyle(color: AppTheme.danger)), + child: Text('放弃', style: TextStyle(color: ctx.tokens.danger)), ), ElevatedButton( onPressed: () => Navigator.of(ctx).pop('draft'), @@ -401,12 +401,12 @@ class _StockOutFormScreenState extends ConsumerState { if (!didPop) _handleExit(); }, child: Scaffold( - backgroundColor: AppTheme.background, + backgroundColor: context.tokens.bg, body: Column( children: [ Container( height: 52, - color: AppTheme.surface, + color: context.tokens.surface, padding: const EdgeInsets.symmetric(horizontal: 16), child: Row( children: [ @@ -508,11 +508,11 @@ class _StockOutFormScreenState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text('基本信息', + Text('基本信息', style: TextStyle( fontSize: 14, fontWeight: FontWeight.w600, - color: AppTheme.primaryDark)), + color: context.tokens.primaryDark)), const SizedBox(height: 16), Wrap( spacing: 16, @@ -628,11 +628,11 @@ class _StockOutFormScreenState extends ConsumerState { children: [ Row( children: [ - const Text('商品明细', + Text('商品明细', style: TextStyle( fontSize: 14, fontWeight: FontWeight.w600, - color: AppTheme.primaryDark)), + color: context.tokens.primaryDark)), const Spacer(), ElevatedButton.icon( onPressed: _addItem, @@ -691,12 +691,12 @@ class _StockOutFormScreenState extends ConsumerState { horizontal: 8, vertical: 10), child: Text(h, - style: const TextStyle( + style: TextStyle( fontSize: 13, fontWeight: FontWeight.w600, - color: AppTheme - .primaryDark)), + color: context + .tokens.primaryDark)), )) .toList(), ), @@ -705,12 +705,12 @@ class _StockOutFormScreenState extends ConsumerState { ], ), if (_items.isEmpty) - const Padding( - padding: EdgeInsets.symmetric(vertical: 24), + Padding( + padding: const EdgeInsets.symmetric(vertical: 24), child: Center( child: Text('暂无商品,点击"添加商品"从库存中选择', style: TextStyle( - color: AppTheme.textSecondary, + color: context.tokens.muted, fontSize: 13))), ), const Divider(height: 1), @@ -725,10 +725,10 @@ class _StockOutFormScreenState extends ConsumerState { fontWeight: FontWeight.w500)), Text( '¥${_totalAmount.toStringAsFixed(2)}', - style: const TextStyle( + style: TextStyle( fontSize: 18, fontWeight: FontWeight.w700, - color: AppTheme.danger), + color: context.tokens.danger), ), ], ), @@ -763,11 +763,11 @@ class _StockOutFormScreenState extends ConsumerState { // 序号 _cell(Text('${index + 1}', style: - const TextStyle(fontSize: 13, color: AppTheme.textSecondary))), + TextStyle(fontSize: 13, color: context.tokens.muted))), // 商品编码 _cell(Text(item.productCode, style: - const TextStyle(fontSize: 12, color: AppTheme.textSecondary))), + TextStyle(fontSize: 12, color: context.tokens.muted))), // 商品名称 _cell(Text(item.productName, style: const TextStyle(fontSize: 13, fontWeight: FontWeight.w500), @@ -775,15 +775,15 @@ class _StockOutFormScreenState extends ConsumerState { // 系列 _cell(Text(item.series, style: - const TextStyle(fontSize: 12, color: AppTheme.textSecondary))), + TextStyle(fontSize: 12, color: context.tokens.muted))), // 规格 _cell(Text(item.spec, style: - const TextStyle(fontSize: 12, color: AppTheme.textSecondary))), + TextStyle(fontSize: 12, color: context.tokens.muted))), // 成本价 _cell(Text(price > 0 ? '¥${price.toStringAsFixed(2)}' : '-', - style: const TextStyle( - fontSize: 13, color: AppTheme.textSecondary))), + style: TextStyle( + fontSize: 13, color: context.tokens.muted))), // 售价(可编辑) Padding( padding: const EdgeInsets.all(4), child: _salePriceField(item)), @@ -796,8 +796,8 @@ class _StockOutFormScreenState extends ConsumerState { Padding( padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 4), child: IconButton( - icon: const Icon(Icons.delete_outline, - size: 18, color: AppTheme.danger), + icon: Icon(Icons.delete_outline, + size: 18, color: context.tokens.danger), onPressed: () => _removeItem(index), tooltip: '删除', padding: EdgeInsets.zero, @@ -854,7 +854,7 @@ class _StockOutFormScreenState extends ConsumerState { item.productCode.isNotEmpty ? Text('编码 ${item.productCode}') : null, trailing: IconButton( icon: - const Icon(Icons.delete_outline, size: 20, color: AppTheme.danger), + Icon(Icons.delete_outline, size: 20, color: context.tokens.danger), onPressed: () => _removeItem(index), tooltip: '删除', visualDensity: VisualDensity.compact, @@ -878,18 +878,18 @@ class _StockOutFormScreenState extends ConsumerState { Widget _buildInventoryCell(int? productId, [double? available]) { if (productId == null) { - return _cell(const Text('-', - style: TextStyle(color: AppTheme.textSecondary, fontSize: 13))); + return _cell(Text('-', + style: TextStyle(color: context.tokens.muted, fontSize: 13))); } final qty = available ?? _inventoryMap[productId]; final text = qty != null ? qty.toStringAsFixed(0) : (_warehouseId == null ? '选仓库后显示' : '-'); final color = qty == null - ? AppTheme.textSecondary + ? context.tokens.muted : qty <= 0 - ? AppTheme.danger - : AppTheme.primary; + ? context.tokens.danger + : context.tokens.primary; return _cell(Text(text, style: TextStyle( fontSize: 13, fontWeight: FontWeight.w700, color: color))); @@ -923,11 +923,11 @@ class _FormField extends StatelessWidget { Row( children: [ if (required) - const Text('*', - style: TextStyle(color: AppTheme.danger, fontSize: 13)), + Text('*', + style: TextStyle(color: context.tokens.danger, fontSize: 13)), Text(label, - style: const TextStyle( - fontSize: 13, color: AppTheme.textSecondary)), + style: TextStyle( + fontSize: 13, color: context.tokens.muted)), ], ), const SizedBox(height: 6), @@ -1050,8 +1050,8 @@ class _InventoryPickerDialogState TextStyle(fontSize: 15, fontWeight: FontWeight.w600)), const SizedBox(width: 8), Text('已选 ${_selected.length} 个', - style: const TextStyle( - fontSize: 13, color: AppTheme.textSecondary)), + style: TextStyle( + fontSize: 13, color: context.tokens.muted)), const Spacer(), IconButton( icon: const Icon(Icons.close, size: 20), @@ -1109,9 +1109,9 @@ class _InventoryPickerDialogState // List Expanded( child: filtered.isEmpty - ? const Center( + ? Center( child: Text('没有匹配的商品', - style: TextStyle(color: AppTheme.textSecondary)), + style: TextStyle(color: context.tokens.muted)), ) : ListView.separated( itemCount: filtered.length, @@ -1147,12 +1147,12 @@ class _InventoryPickerDialogState ), ), _dataCell(item.productCode, 110, - color: AppTheme.textSecondary), + color: context.tokens.muted), _dataCell(item.productName, 200, bold: true), _dataCell(item.series, 110, - color: AppTheme.textSecondary), + color: context.tokens.muted), _dataCell(item.spec, 130, - color: AppTheme.textSecondary), + color: context.tokens.muted), _dataCell( item.unitPrice != null ? '¥${item.unitPrice!.toStringAsFixed(2)}' @@ -1163,8 +1163,8 @@ class _InventoryPickerDialogState item.availableQty.toStringAsFixed(0), 90, color: item.availableQty <= 0 - ? AppTheme.danger - : AppTheme.primary, + ? context.tokens.danger + : context.tokens.primary, bold: true, ), ], @@ -1196,8 +1196,8 @@ class _InventoryPickerDialogState // 库存总数汇总(无搜索=整仓总数,搜索时=匹配总数) Text( _loading ? '加载中…' : '共 $_total 项库存商品', - style: const TextStyle( - fontSize: 13, color: AppTheme.textSecondary), + style: TextStyle( + fontSize: 13, color: context.tokens.muted), ), const SizedBox(width: 12), // 翻页 @@ -1255,10 +1255,10 @@ class _InventoryPickerDialogState Widget _headerCell(String text, double width) => SizedBox( width: width, child: Text(text, - style: const TextStyle( + style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, - color: AppTheme.primaryDark)), + color: context.tokens.primaryDark)), ); Widget _dataCell(String text, double width, diff --git a/client/lib/screens/stock_out/stock_out_list_screen.dart b/client/lib/screens/stock_out/stock_out_list_screen.dart index df885dc..060ce3e 100644 --- a/client/lib/screens/stock_out/stock_out_list_screen.dart +++ b/client/lib/screens/stock_out/stock_out_list_screen.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import '../../core/responsive/responsive.dart'; -import '../../core/theme/app_theme.dart'; +import '../../core/theme/context_tokens.dart'; import '../../models/stock_out.dart'; import '../../providers/stock_out_provider.dart'; import '../../repositories/stock_out_repository.dart'; @@ -158,10 +158,10 @@ class _StockOutListScreenState extends ConsumerState { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.cloud_off, size: 40, color: AppTheme.textSecondary), + Icon(Icons.cloud_off, size: 40, color: context.tokens.muted), const SizedBox(height: 12), - const Text('暂无数据,网络不可用', - style: const TextStyle(color: AppTheme.textSecondary)), + Text('暂无数据,网络不可用', + style: TextStyle(color: context.tokens.muted)), const SizedBox(height: 12), ElevatedButton( onPressed: () => @@ -277,8 +277,8 @@ class _StockOutListScreenState extends ConsumerState { return DataCell(GestureDetector( onTap: () => _showDetail(context, o.id), child: Text(o.orderNo, - style: const TextStyle( - color: AppTheme.primary, + style: TextStyle( + color: context.tokens.primary, fontFamily: 'monospace', fontSize: 12, decoration: TextDecoration.underline)), @@ -330,8 +330,8 @@ class _StockOutListScreenState extends ConsumerState { cells: List.generate( visibleCols.length, (i) => i == 0 - ? const DataCell(Text('暂无出库单', - style: TextStyle(color: AppTheme.textSecondary))) + ? DataCell(Text('暂无出库单', + style: TextStyle(color: context.tokens.muted))) : const DataCell(SizedBox()), ), ), @@ -640,7 +640,7 @@ class _StockOutListScreenState extends ConsumerState { TextButton(onPressed: () => Navigator.pop(ctx, false), child: const Text('取消')), TextButton( onPressed: () => Navigator.pop(ctx, true), - child: const Text('确认结清', style: TextStyle(color: AppTheme.accent)), + child: Text('确认结清', style: TextStyle(color: context.tokens.accent)), ), ], ), @@ -650,13 +650,13 @@ class _StockOutListScreenState extends ConsumerState { await ref.read(financeRepositoryProvider).closeByRef(refType, orderId); if (context.mounted) { ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('已结清'), backgroundColor: AppTheme.success), + SnackBar(content: const Text('已结清'), backgroundColor: context.tokens.success), ); } } catch (e) { if (context.mounted) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(e.toString()), backgroundColor: AppTheme.danger), + SnackBar(content: Text(e.toString()), backgroundColor: context.tokens.danger), ); } } @@ -675,7 +675,7 @@ class _StockOutListScreenState extends ConsumerState { ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.danger, + backgroundColor: context.tokens.danger, foregroundColor: Colors.white), child: const Text('删除'), ), @@ -686,14 +686,14 @@ class _StockOutListScreenState extends ConsumerState { try { await ref.read(stockOutListProvider.notifier).deleteOrder(o.id); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text('已删除'), backgroundColor: AppTheme.success)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('已删除'), backgroundColor: context.tokens.success)); } } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text('删除失败:$e'), - backgroundColor: AppTheme.danger)); + backgroundColor: context.tokens.danger)); } } } @@ -722,15 +722,15 @@ class _StockOutListScreenState extends ConsumerState { .read(stockOutListProvider.notifier) .submitOrder(o.id); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text('已提交审核'), - backgroundColor: AppTheme.success)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('已提交审核'), + backgroundColor: context.tokens.success)); } } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text('提交失败:$e'), - backgroundColor: AppTheme.danger)); + backgroundColor: context.tokens.danger)); } } } @@ -750,7 +750,7 @@ class _StockOutListScreenState extends ConsumerState { ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.success, + backgroundColor: context.tokens.success, foregroundColor: Colors.white), child: const Text('通过'), ), @@ -763,14 +763,14 @@ class _StockOutListScreenState extends ConsumerState { .read(stockOutListProvider.notifier) .approveOrder(o.id); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text('审核通过'), backgroundColor: AppTheme.success)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('审核通过'), backgroundColor: context.tokens.success)); } } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text('审核失败:$e'), - backgroundColor: AppTheme.danger, + backgroundColor: context.tokens.danger, duration: const Duration(seconds: 5))); } } @@ -791,7 +791,7 @@ class _StockOutListScreenState extends ConsumerState { ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.danger, + backgroundColor: context.tokens.danger, foregroundColor: Colors.white), child: const Text('拒绝'), ), @@ -802,14 +802,14 @@ class _StockOutListScreenState extends ConsumerState { try { await ref.read(stockOutListProvider.notifier).rejectOrder(o.id); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text('已拒绝'), backgroundColor: AppTheme.accent)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('已拒绝'), backgroundColor: context.tokens.accent)); } } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text('操作失败:$e'), - backgroundColor: AppTheme.danger)); + backgroundColor: context.tokens.danger)); } } } @@ -829,7 +829,7 @@ class _StockOutListScreenState extends ConsumerState { ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.accent, + backgroundColor: context.tokens.accent, foregroundColor: Colors.white), child: const Text('撤回'), ), @@ -840,14 +840,14 @@ class _StockOutListScreenState extends ConsumerState { try { await ref.read(stockOutListProvider.notifier).withdrawOrder(o.id); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text('已撤回为草稿'), backgroundColor: AppTheme.accent)); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: const Text('已撤回为草稿'), backgroundColor: context.tokens.accent)); } } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar(SnackBar( content: Text('撤回失败:$e'), - backgroundColor: AppTheme.danger)); + backgroundColor: context.tokens.danger)); } } } @@ -866,7 +866,7 @@ class _StockOutListScreenState extends ConsumerState { ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), style: ElevatedButton.styleFrom( - backgroundColor: AppTheme.danger, foregroundColor: Colors.white), + backgroundColor: context.tokens.danger, foregroundColor: Colors.white), child: const Text('确认'), ), ], @@ -879,7 +879,7 @@ class _StockOutListScreenState extends ConsumerState { } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('加载明细失败:$e'), backgroundColor: AppTheme.danger)); + SnackBar(content: Text('加载明细失败:$e'), backgroundColor: context.tokens.danger)); } return; } @@ -967,9 +967,9 @@ class _StockOutDetailDialogState extends ConsumerState<_StockOutDetailDialog> { children: [ Container( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14), - decoration: const BoxDecoration( - color: AppTheme.primary, - borderRadius: BorderRadius.only( + decoration: BoxDecoration( + color: context.tokens.primary, + borderRadius: const BorderRadius.only( topLeft: Radius.circular(12), topRight: Radius.circular(12), ), @@ -1003,14 +1003,14 @@ class _StockOutDetailDialogState extends ConsumerState<_StockOutDetailDialog> { return const Center(child: CircularProgressIndicator()); } if (snap.hasError) { - return const Center( + return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(Icons.cloud_off, size: 40, color: AppTheme.textSecondary), - SizedBox(height: 12), + Icon(Icons.cloud_off, size: 40, color: context.tokens.muted), + const SizedBox(height: 12), Text('暂无数据,网络不可用', - style: TextStyle(color: AppTheme.textSecondary)), + style: TextStyle(color: context.tokens.muted)), ], ), ); @@ -1047,18 +1047,18 @@ class _StockOutDetailDialogState extends ConsumerState<_StockOutDetailDialog> { ], ), const SizedBox(height: 20), - const Text('商品明细', + Text('商品明细', style: TextStyle( fontSize: 14, fontWeight: FontWeight.w600, - color: AppTheme.primaryDark)), + color: context.tokens.primaryDark)), const SizedBox(height: 8), if (o.items.isEmpty) - const Text('无商品明细', - style: TextStyle(color: AppTheme.textSecondary)) + Text('无商品明细', + style: TextStyle(color: context.tokens.muted)) else Table( - border: TableBorder.all(color: AppTheme.border, width: 0.5), + border: TableBorder.all(color: context.tokens.border, width: 0.5), columnWidths: const { 0: FixedColumnWidth(36), 1: FlexColumnWidth(1.2), @@ -1078,10 +1078,10 @@ class _StockOutDetailDialogState extends ConsumerState<_StockOutDetailDialog> { .map((h) => Padding( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 10), child: Text(h, - style: const TextStyle( + style: TextStyle( fontSize: 13, fontWeight: FontWeight.w600, - color: AppTheme.primaryDark)), + color: context.tokens.primaryDark)), )) .toList(), ), @@ -1144,8 +1144,8 @@ class _InfoField extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(label, - style: const TextStyle( - fontSize: 12, color: AppTheme.textSecondary)), + style: TextStyle( + fontSize: 12, color: context.tokens.muted)), const SizedBox(height: 2), Text(value, style: const TextStyle( @@ -1184,9 +1184,9 @@ class _StatusFilterDropdown extends StatelessWidget { height: 36, padding: const EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration( - border: Border.all(color: AppTheme.border), + border: Border.all(color: context.tokens.border), borderRadius: BorderRadius.circular(4), - color: AppTheme.surface, + color: context.tokens.surface, ), child: DropdownButtonHideUnderline( child: DropdownButton( @@ -1199,7 +1199,7 @@ class _StatusFilterDropdown extends StatelessWidget { DropdownMenuItem(value: 'rejected', child: Text('已拒绝', style: TextStyle(fontSize: 13))), ], onChanged: onChanged, - style: const TextStyle(fontSize: 13, color: AppTheme.textPrimary), + style: TextStyle(fontSize: 13, color: context.tokens.text), ), ), );