// widgets/ds/status_icon_map.dart — 状态词 → 徽章图标映射。 // 单一真相源镜像:原型 icons.js 的 BADGE_ICON(2026-07-04 拍板:全系统圆点→代表图标), // 逐词转录为 LucideIcons。新增状态先在原型 icons.js 登记,再同步到此表。 import 'package:flutter/widgets.dart'; import 'package:lucide_icons_flutter/lucide_icons.dart'; const Map kStatusIcons = { // 库存状态 '在售': LucideIcons.shoppingCart, // i-cart '预警': LucideIcons.triangleAlert, // i-alert '缺货': LucideIcons.x, // i-close // 单据状态 '草稿': LucideIcons.fileText, // i-ic06 '待审核': LucideIcons.clock, // i-ic04 '已审核': LucideIcons.check, // i-check '已拒绝': LucideIcons.x, // i-close '已通过': LucideIcons.check, // i-check '已驳回': LucideIcons.x, // i-close '部分退单': LucideIcons.undo2, // i-undo '已退单': LucideIcons.undo2, // i-undo '待定价': LucideIcons.japaneseYen, // i-yen // 通用启停 / 往来类型 '启用': LucideIcons.check, // i-check '停用': LucideIcons.x, // i-close '供应商': LucideIcons.box, // i-box '客户': LucideIcons.user, // i-ic37 '两者': LucideIcons.refreshCw, // i-refresh // 角色 '管理员': LucideIcons.shield, // i-shield-2 '普通': LucideIcons.user, // i-ic37 '只读': LucideIcons.eye, // i-eye // 设备 / 会话 '在线': LucideIcons.wifi, // i-wifi '离线': LucideIcons.wifiOff, // i-wifi-off // 盘点 '进行中': LucideIcons.clock, // i-ic04 '已完成': LucideIcons.check, // i-check // 兑换券 '未使用': LucideIcons.tag, // i-tag '已兑换': LucideIcons.check, // i-check '作废': LucideIcons.x, // i-close // 财务 '未结清': LucideIcons.clock, // i-ic04 '已结清': LucideIcons.check, // i-check '收款': LucideIcons.download, // i-download '付款': LucideIcons.upload, // i-upload }; /// 查状态词对应图标;未登记返回 null(调用方回退圆点形态)。 IconData? statusIcon(String label) => kStatusIcons[label];