feat(client): KPI 图标改用 lucide(与原型同源图形库)
原型图标源自 lucide-static(icons.js)。引入 lucide_icons_flutter 包, 库存屏 KPI 图标改 LucideIcons.box/database/box/triangleAlert,与原型一模一样 (不再用 Material 凑近似)。golden_harness 加载 Lucide package 字体(family 带 packages/ 前缀),golden 正确渲染。flutter test 242 通过。 后续:侧栏/顶栏/状态栏图标也逐步换 lucide(对照 shell.js)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -27,6 +27,14 @@ Future<void> ensureGoldenFonts() async {
|
||||
break;
|
||||
} catch (_) {/* 换下一个 asset key */}
|
||||
}
|
||||
// lucide 图标字体(与原型同款图形库)。
|
||||
try {
|
||||
// package 字体在运行时 family 带 packages/<pkg>/ 前缀,FontLoader 须用全名。
|
||||
final lucide = FontLoader('packages/lucide_icons_flutter/Lucide')
|
||||
..addFont(
|
||||
rootBundle.load('packages/lucide_icons_flutter/assets/lucide.ttf'));
|
||||
await lucide.load();
|
||||
} catch (_) {/* 包未装时跳过 */}
|
||||
_fontsLoaded = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user