Files
pangolin/client/lib/widgets/pangolin_icons.dart
T
wangjia f97ae8186b feat(client): Flutter 逐屏还原 + iPad ≥900 断点 (tsk_gpPXi-icyeOE)
对照 design/ui_kits mobile+tablet 原型逐屏补齐 Flutter 客户端:

- l10n 资源层(strings_zh/en,单显)+ Riverpod 状态层(连接状态机/免费额度/
  节点选择/语言/主题),UI 与数据解耦,mock 数据接 API 不动 UI。
- 连接键严格三态(off 虚线轨道环 / connecting 旋转弧 / on 满环+计时+光晕),
  状态来自 connectionProvider,点击只派发事件——禁止乐观显示。
- 节点页置顶「智能选择」推荐卡(clay 渐变 zap + 推荐胶囊,默认选中);
  免费额度卡(剩余分钟+进度条 ≤3 分钟切 warning + 看广告解锁变绿)。
- Tab 左右滑动切换(手势竞技场仲裁,子页滚动不误触发,200ms 方向感知滑入)。
- iPad/宽屏 ≥900 LayoutBuilder 切侧栏分栏(导航行高 ≥48,连接页双栏/节点双列网格),
  复用同一批原子组件,不 fork 页面。
- 语义 token 零硬编码;文案全部走 l10n;套餐数字对齐 §7;无支付表单/emoji 国旗。
- CI 红线词扫描扩展到 client/lib;新增 Flutter analyze+test CI 任务。
- 测试:连接状态机/额度/节点单测、连接键三态与卡片组件测试、
  golden(连接键三态/推荐卡/额度卡 × 明暗)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 14:32:36 +08:00

71 lines
3.2 KiB
Dart

// pangolin_icons.dart — Lucide 图标映射表
import 'package:flutter/widgets.dart';
import 'package:lucide_icons/lucide_icons.dart';
class PangolinIcons {
PangolinIcons._();
// ── 连接 / 状态 ──
static const power = LucideIcons.power;
static const shieldCheck = LucideIcons.shieldCheck;
static const shield = LucideIcons.shield;
static const loader = LucideIcons.loader;
static const zap = LucideIcons.zap;
static const globe = LucideIcons.globe;
static const clock = LucideIcons.clock;
static const playCircle = LucideIcons.playCircle;
static const wifi = LucideIcons.wifi;
// ── 导航 / 操作 ──
static const settings = LucideIcons.settings;
static const user = LucideIcons.user;
static const search = LucideIcons.search;
static const check = LucideIcons.check;
static const checkCircle = LucideIcons.checkCircle;
static const x = LucideIcons.x;
static const chevronRight = LucideIcons.chevronRight;
static const chevronDown = LucideIcons.chevronDown;
static const arrowLeft = LucideIcons.arrowLeft;
static const arrowUp = LucideIcons.arrowUp;
static const arrowDown = LucideIcons.arrowDown;
static const refreshCw = LucideIcons.refreshCw;
static const compass = LucideIcons.compass;
static const barChart = LucideIcons.barChart;
static const mapPin = LucideIcons.mapPin;
// ── 主题 ──
static const moon = LucideIcons.moon;
static const sun = LucideIcons.sun;
// ── 账户 / 套餐 / 兑换 ──
static const crown = LucideIcons.crown;
static const ticket = LucideIcons.ticket;
static const creditCard = LucideIcons.creditCard;
static const shoppingBag = LucideIcons.shoppingBag;
static const mail = LucideIcons.mail;
static const lock = LucideIcons.lock;
static const logOut = LucideIcons.logOut;
static const send = LucideIcons.send;
static const messageCircle= LucideIcons.messageCircle;
static const externalLink = LucideIcons.externalLink;
// ── 设备 ──
static const laptop = LucideIcons.laptop;
static const smartphone = LucideIcons.smartphone;
static const monitorSmartphone = LucideIcons.smartphone; // 回退
static IconData? byName(String name) => _byName[name];
static const Map<String, IconData> _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,
};
}