Skip to content

fix(mine): scale long balance instead of truncating in the header stat cell - #481

Open
HsukqiLee wants to merge 1 commit into
TNT-Likely:mainfrom
TsinbeiLabs:fix/mine-balance-truncation
Open

HsukqiLee wants to merge 1 commit into
TNT-Likely:mainfrom
TsinbeiLabs:fix/mine-balance-truncation

Conversation

@HsukqiLee

Copy link
Copy Markdown

变更说明 / What & Why

「我的」页头部统计行三个 Expanded(_StatCell) 三等分宽度,余额格内的 AmountTextmaxLines: 1 + ellipsis,长余额(如带币种符号的千万级金额)在 1/3 宽度内被截断成省略号(#453)。

修复:在 _StatCell 的金额分支给 AmountText 包一层 FittedBox(fit: BoxFit.scaleDown),长余额整体缩放显示而不是截断——与 home_page.dart 月度收支汇总(_HeaderCenterSummary.item)对 AmountText 的既有处理完全一致。非金额单元格行为不变。

关联 Issue / Related Issue

Closes #453

自测情况 / Self-tested

  • flutter analyze 无新增告警 / no new warnings(文件内既有 unused_import/dead_code 警告与本改动无关)
  • flutter test 通过 / tests pass(Flutter 3.27.3,全量 649 通过,含新增 2 个回归测试)
  • 已实机运行验证;UI 变更已附截图 / verified on a real device; screenshots attached for UI changes(本地无 Android 模拟器;回归测试以窄宽度约束复现了截断并验证 FittedBox 修复)
  • 不涉及文案变更 / no copy changes

新增测试 test/widgets/mine_balance_fit_test.dart

  1. AmountText 在 80px 宽约束下段落宽度被压到约束内(即截断复现);
  2. FittedBox 包裹后段落按自然宽度排版再整体缩放,完整金额保持可读。

贡献者许可条款 / Contributor License Terms

…t cell

Signed-off-by: Hsukqi Lee <team@tsinbei.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 帳本結餘顯示 UI 問題

1 participant