// pangolin_icons.dart — Lucide 图标映射表 // // React UI Kit 用 Lucide 图标(按名引用,如 'power' / 'shield-check')。 // 本文件把这些名映射到 Flutter 的 lucide_icons 包常量,保证与设计像素一致。 // // 依赖:在 pubspec.yaml 添加 // dependencies: // lucide_icons: ^0.x # https://pub.dev/packages/lucide_icons // // 用法 A(直用常量,推荐): // Icon(PangolinIcons.power, size: 20, color: c.accent) // 用法 B(按 Lucide 名查表,便于从 React data-lucide 移植): // Icon(PangolinIcons.byName('shield-check')) // // ⚠️ lucide_icons 各版本常量名可能略有差异;若某常量在你的版本里不存在, // 按 IDE 提示替换为最接近的名称即可(已在右侧注明 Lucide 原名)。 import 'package:flutter/widgets.dart'; import 'package:lucide_icons/lucide_icons.dart'; class PangolinIcons { PangolinIcons._(); // ── 连接 / 状态 ── static const power = LucideIcons.power; // power — 连接键 static const shieldCheck = LucideIcons.shieldCheck; // shield-check — 已加密 static const shield = LucideIcons.shield; // shield — Kill Switch static const loader = LucideIcons.loader; // loader-circle — 连接中(旋转) static const zap = LucideIcons.zap; // zap — 延迟 / 极速 static const globe = LucideIcons.globe; // globe — 节点 // ── 导航 / 操作 ── static const settings = LucideIcons.settings; // settings static const user = LucideIcons.user; // user — 账户 static const search = LucideIcons.search; // search static const check = LucideIcons.check; // check — 选中 static const checkCircle = LucideIcons.checkCircle; // check-circle — 成功 static const x = LucideIcons.x; // x — 关闭 static const chevronRight = LucideIcons.chevronRight; // chevron-right static const chevronDown = LucideIcons.chevronDown; // chevron-down static const arrowLeft = LucideIcons.arrowLeft; // arrow-left — 返回 static const arrowUp = LucideIcons.arrowUp; // arrow-up — 上传 static const arrowDown = LucideIcons.arrowDown; // arrow-down — 下载 static const refreshCw = LucideIcons.refreshCw; // refresh-cw — 检查更新 static const compass = LucideIcons.compass; // compass — 引导 static const barChart = LucideIcons.barChart; // chart-no-axes-column / chart — 统计 static const mapPin = LucideIcons.mapPin; // map-pin // ── 主题 ── static const moon = LucideIcons.moon; // moon — 深色 static const sun = LucideIcons.sun; // sun — 浅色 // ── 账户 / 套餐 / 兑换 ── static const crown = LucideIcons.crown; // crown — PRO static const ticket = LucideIcons.ticket; // ticket — 兑换 / 续费 static const creditCard = LucideIcons.creditCard; // credit-card static const shoppingBag = LucideIcons.shoppingBag; // shopping-bag — 发卡商店 static const mail = LucideIcons.mail; // mail — 邮箱 static const lock = LucideIcons.lock; // lock — 密码 static const logOut = LucideIcons.logOut; // log-out — 退出 static const send = LucideIcons.send; // send — Telegram static const messageCircle= LucideIcons.messageCircle; // message-circle — LINE / 联系 static const externalLink = LucideIcons.externalLink; // external-link — 外链 // ── 设备 ── static const laptop = LucideIcons.laptop; // laptop static const smartphone = LucideIcons.smartphone; // smartphone // monitor-smartphone 在部分版本缺失,回退到 smartphone(平板亦可用 LucideIcons.tablet) static const monitorSmartphone = LucideIcons.smartphone; // monitor-smartphone(回退) /// 按 Lucide 原名查表(React data-lucide 名 → IconData)。未命中返回 null。 static IconData? byName(String name) => _byName[name]; static const Map _byName = { 'power': power, 'shield-check': shieldCheck, 'shield': shield, 'loader-circle': loader, 'zap': zap, 'globe': globe, 'settings': settings, 'user': user, 'search': search, 'check': check, 'check-circle': checkCircle, 'x': x, 'chevron-right': chevronRight, 'chevron-down': chevronDown, 'arrow-left': arrowLeft, 'arrow-up': arrowUp, 'arrow-down': arrowDown, 'refresh-cw': refreshCw, 'compass': compass, 'chart-no-axes-column': barChart, 'chart': barChart, 'map-pin': mapPin, 'moon': moon, 'sun': sun, 'crown': crown, 'ticket': ticket, 'credit-card': creditCard, 'shopping-bag': shoppingBag, 'mail': mail, 'lock': lock, 'log-out': logOut, 'send': send, 'message-circle': messageCircle, 'external-link': externalLink, 'laptop': laptop, 'smartphone': smartphone, 'monitor-smartphone': monitorSmartphone, }; }