feat(client): 切页滑动过渡 + 二级屏返回手势方向修正 + 授权三格横排

- 窄屏切页加方向感知滑入过渡(240ms easeOutCubic + 渐显):tab 间按左右
  次序、进二级屏从右滑入、返回从左滑入;桌面无动画。控制器在 initState
  创建(惰性 late 到 dispose 才求值会在已卸载树上找 Ticker 崩溃)
- 二级屏返回手势方向修正:从左往右滑=退出(iOS 返回习惯),向左滑无响应
- 授权信息三格(状态/到期日/剩余天数)窄屏改横排:间距收窄 + FittedBox
  缩放值文本防溢出,桌面不变

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-04 20:39:31 +08:00
parent 9efd1177b7
commit 02cffcb9ba
2 changed files with 94 additions and 28 deletions
+24 -21
View File
@@ -86,22 +86,16 @@ class _LicensePanelState extends ConsumerState<LicensePanel> {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// ── 卡1:授权信息(3 cell,自「关于我们」迁入)──
// ── 卡1:授权信息(3 cell 横排,窄屏同样横排、间距收窄)──
SettingsCard(
title: '授权信息',
desc: '当前门店的授权状态与有效期,续期时长在现有到期时间上叠加',
child: context.isMobile
? Column(children: [
for (final c in licCells)
Padding(
padding: const EdgeInsets.only(bottom: 10), child: c),
])
: Row(children: [
for (var i = 0; i < licCells.length; i++) ...[
if (i > 0) const SizedBox(width: 14),
Expanded(child: licCells[i]),
],
]),
child: Row(children: [
for (var i = 0; i < licCells.length; i++) ...[
if (i > 0) SizedBox(width: context.isMobile ? 8 : 14),
Expanded(child: licCells[i]),
],
]),
),
const SizedBox(height: 16),
// ── 卡2:在线购买 / 续费(后端 purchase 接口 admin only
@@ -189,7 +183,10 @@ class _LicensePanelState extends ConsumerState<LicensePanel> {
/// 原型 .lic-cell(与「关于我们」同款):lk 11 muted + lv 17/700/mono。
Widget _licCell(dynamic t, String label, String value, {Color? color}) =>
Container(
padding: const EdgeInsets.fromLTRB(16, 14, 16, 14),
// 窄屏三格横排时收窄内距,值文本按格宽缩放防溢出(如 2026-06-25
padding: context.isMobile
? const EdgeInsets.fromLTRB(10, 12, 10, 12)
: const EdgeInsets.fromLTRB(16, 14, 16, 14),
decoration: BoxDecoration(
color: t.bg,
border: Border.all(color: t.borderSubtle),
@@ -199,15 +196,21 @@ class _LicensePanelState extends ConsumerState<LicensePanel> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: AppDims.fsXs, color: t.muted)),
const SizedBox(height: 6),
Text(value,
style: TextStyle(
fontSize: AppDims.fsH2,
fontWeight: FontWeight.w700,
fontFamily: AppFonts.mono,
fontFamilyFallback: AppFonts.monoFallback,
color: color ?? t.heading)),
FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(value,
style: TextStyle(
fontSize: AppDims.fsH2,
fontWeight: FontWeight.w700,
fontFamily: AppFonts.mono,
fontFamilyFallback: AppFonts.monoFallback,
color: color ?? t.heading)),
),
],
),
);