272eca04ce
购买/支付(Phase B): - 新 SegSwitch 段控 widget(镜像 .segswitch 原子) - 购买页重构:顶部支付渠道 switch(默认 USDT→加密货币 / 人民币→支付宝),套餐价随渠道分币种显示,删底部弹窗选方式;点购买直达支付页 - 支付页加订单信息卡(套餐/渠道/金额按币种) - models:PayChannel + PayCatalogItem.priceUsdtMicro/priceLabel(ch)/perMonthLabel(ch) 订单(P0,全新): - payment_api.listOrders() + orders_provider(列表 + 详情 family) - OrdersScreen 列表→详情(状态 pill / 可复制订单号 / 继续支付·重新购买) - 导航:NavView.orders + desktop_shell 分支 + account 入口 配套: - l10n +19 getter(支付渠道 4 + 订单 15)×6 语言,l10n 闸绿 - 图标单源迁移 lucide_icons_flutter + pangolin_icons.dart(codegen) - 联系渠道订正(Telegram/邮件 support@yanmeiai.com/官网) + 前端去广告&时长 - 测试:购买 switch 分币种 + 订单列表/空态/详情 + 假 API listOrders;golden 重录 - flutter analyze 0 error,flutter test 226 全绿 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
53 lines
2.0 KiB
Dart
53 lines
2.0 KiB
Dart
// bottom_tab_bar.dart — 移动端底部 Tab(4 项,对照 ui_kits/mobile)
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||
|
||
import '../pangolin_theme.dart';
|
||
import '../state/app_providers.dart';
|
||
import '../state/navigation_provider.dart';
|
||
import 'pangolin_icons.dart';
|
||
|
||
class BottomTabBar extends ConsumerWidget {
|
||
const BottomTabBar({super.key, required this.current, required this.onTap});
|
||
|
||
final NavView current;
|
||
final ValueChanged<NavView> onTap;
|
||
|
||
@override
|
||
Widget build(BuildContext context, WidgetRef ref) {
|
||
final c = context.pangolin;
|
||
final t = ref.watch(appTextProvider);
|
||
final items = <({IconData icon, String label, NavView view})>[
|
||
(icon: PangolinIcons.power, label: t.tabConnect, view: NavView.connect),
|
||
(icon: PangolinIcons.globe, label: t.tabServers, view: NavView.servers),
|
||
(icon: PangolinIcons.chartNoAxesColumn, label: t.tabStats, view: NavView.stats),
|
||
(icon: PangolinIcons.user, label: t.tabMe, view: NavView.account),
|
||
];
|
||
return Container(
|
||
decoration: BoxDecoration(
|
||
color: c.surface,
|
||
border: Border(top: BorderSide(color: c.border)),
|
||
),
|
||
padding: const EdgeInsets.only(top: 8, bottom: 22),
|
||
child: Row(children: [
|
||
for (final item in items)
|
||
Expanded(
|
||
child: GestureDetector(
|
||
behavior: HitTestBehavior.opaque,
|
||
onTap: () => onTap(item.view),
|
||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||
Icon(item.icon, size: 22, color: current == item.view ? c.accent : c.fg3),
|
||
const SizedBox(height: 4),
|
||
Text(item.label,
|
||
style: PangolinText.caption.copyWith(
|
||
color: current == item.view ? c.accent : c.fg3,
|
||
fontWeight: current == item.view ? FontWeight.w700 : FontWeight.w500,
|
||
)),
|
||
]),
|
||
),
|
||
),
|
||
]),
|
||
);
|
||
}
|
||
}
|