refactor(client): widgets 颜色迁移到 context.tokens
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -287,7 +287,7 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
? '¥${o.totalAmount!.toStringAsFixed(2)}'
|
||||
: '-'));
|
||||
case 'status':
|
||||
final rb = returnStateBadge(o.returnState);
|
||||
final rb = returnStateBadge(context, o.returnState);
|
||||
return DataCell(Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatusBadge(_apiStatusToEnum(o.status)),
|
||||
if (rb != null) ...[const SizedBox(width: 4), rb],
|
||||
@@ -519,6 +519,7 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
/// 入库特有的「打标签」通过 afterPrint 注入。
|
||||
List<Widget> _orderActions(BuildContext context, StockInOrder o) {
|
||||
return buildOrderRowActions(
|
||||
context: context,
|
||||
readonly: WriteGuard.isReadonly(ref),
|
||||
canWithdraw: ref.watch(isAdminProvider) ||
|
||||
(o.operatorId != null &&
|
||||
@@ -585,9 +586,9 @@ class _StockInListScreenState extends ConsumerState<StockInListScreen> {
|
||||
style: const TextStyle(fontFamily: 'monospace', fontSize: 14)),
|
||||
trailing: Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatusBadge(_apiStatusToEnum(o.status)),
|
||||
if (returnStateBadge(o.returnState) != null) ...[
|
||||
if (returnStateBadge(context, o.returnState) != null) ...[
|
||||
const SizedBox(width: 4),
|
||||
returnStateBadge(o.returnState)!,
|
||||
returnStateBadge(context, o.returnState)!,
|
||||
],
|
||||
]),
|
||||
fields: [
|
||||
|
||||
@@ -292,7 +292,7 @@ class _StockOutListScreenState extends ConsumerState<StockOutListScreen> {
|
||||
? '¥${o.totalAmount!.toStringAsFixed(2)}'
|
||||
: '-'));
|
||||
case 'status':
|
||||
final rb = returnStateBadge(o.returnState);
|
||||
final rb = returnStateBadge(context, o.returnState);
|
||||
return DataCell(Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatusBadge(_apiStatusToEnum(o.status)),
|
||||
if (rb != null) ...[const SizedBox(width: 4), rb],
|
||||
@@ -549,6 +549,7 @@ class _StockOutListScreenState extends ConsumerState<StockOutListScreen> {
|
||||
/// 操作按钮列表,表格与移动端卡片共用。
|
||||
List<Widget> _orderActions(BuildContext context, StockOutOrder o) {
|
||||
return buildOrderRowActions(
|
||||
context: context,
|
||||
readonly: WriteGuard.isReadonly(ref),
|
||||
canWithdraw: ref.watch(isAdminProvider) ||
|
||||
(o.operatorId != null &&
|
||||
@@ -585,9 +586,9 @@ class _StockOutListScreenState extends ConsumerState<StockOutListScreen> {
|
||||
style: const TextStyle(fontFamily: 'monospace', fontSize: 14)),
|
||||
trailing: Row(mainAxisSize: MainAxisSize.min, children: [
|
||||
StatusBadge(_apiStatusToEnum(o.status)),
|
||||
if (returnStateBadge(o.returnState) != null) ...[
|
||||
if (returnStateBadge(context, o.returnState) != null) ...[
|
||||
const SizedBox(width: 4),
|
||||
returnStateBadge(o.returnState)!,
|
||||
returnStateBadge(context, o.returnState)!,
|
||||
],
|
||||
]),
|
||||
fields: [
|
||||
|
||||
Reference in New Issue
Block a user