fix(client): 状态下拉对照原型 .menu(白底圆角 + 选中蓝勾蓝字)

实现原是 Material 默认下拉(灰底 + 灰高亮块),改为对照原型 .menu/.menu-item:
白底圆角描边、选中项 lucide check 蓝勾 + 蓝字 fw600、去掉 initialValue 灰高亮。

注:此菜单样式多处复用(主题器/用户/列设置),下一步抽成 DsMenu 统一。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
wangjia
2026-06-25 22:58:08 +08:00
parent 0b19a99fda
commit c2f4b97423
@@ -805,12 +805,40 @@ class _InventoryListScreenState extends ConsumerState<InventoryListScreen> {
SizedBox(width: 240, child: searchField),
const SizedBox(width: AppDims.sp3),
PopupMenuButton<String>(
initialValue: _statusFilter,
onSelected: (v) => setState(() => _statusFilter = v),
itemBuilder: (_) => const ['全部', '在售', '预警', '缺货']
.map((s) =>
PopupMenuItem(value: s, child: Text(s)))
.toList(),
color: ctx.tokens.surface,
elevation: 8,
shape: RoundedRectangleBorder(
side: BorderSide(color: ctx.tokens.border),
borderRadius: BorderRadius.circular(AppDims.rMd),
),
itemBuilder: (_) =>
['全部', '在售', '预警', '缺货'].map((s) {
final sel = s == _statusFilter;
return PopupMenuItem<String>(
value: s,
height: 40,
child: Row(children: [
SizedBox(
width: 18,
child: sel
? Icon(LucideIcons.check,
size: 15, color: ctx.tokens.primary)
: null,
),
const SizedBox(width: 4),
Text(s,
style: TextStyle(
fontSize: 13,
color: sel
? ctx.tokens.primary
: ctx.tokens.text,
fontWeight: sel
? FontWeight.w600
: FontWeight.w400)),
]),
);
}).toList(),
child: DsChip(
label: '状态',
value: _statusFilter == '全部' ? null : _statusFilter,