Files
FruitServer/docs/plans/INBOX.md
T

2.6 KiB
Raw Blame History

INBOX

[已处理] K71-A 首页深色底部导航补齐安全区底色

现象

首页 feed(深色)下,底部导航下方的系统安全区(iOS Home Indicator 条 / Android 手势条区域) 颜色与首页背景不一致:会透出窗口底色或模糊内容,看上去有一条浅色/发灰的边。

根因

lib/core/widgets/app_bottom_nav.dart:

ClipRect(
  child: BackdropFilter(
    filter: ImageFilter.blur(...),
    child: SafeArea(
      top: false,
      child: Container(height: navHeight, color: 0xE6000000, ...),
    ),
  ),
)

SafeArea 的底部内边距在 Container 之外,没有任何填充色;深色模式下导航条本身也是 0xE6000000 半透明叠在窗口底色上,所以「导航条 + 下方安全区」都跟首页的纯黑背景不一致。

目标

  • 首页 feed(dark: true):底部导航条与下方安全区整体为纯黑 Colors.black, 与首页背景一致,不再透出模糊/白底。
  • 浅色模式(剧场/创作/我的、其它页面):保持现有玻璃模糊 + 0.95 透明观感不变。

实现

lib/core/widgets/app_bottom_nav.dart 的 build:

  • 深色分支:
    • ColoredBox(color: Colors.black) 包住 SafeArea(top: false, child: 导航条 Container)
    • 导航条 Container 的底色改为 Colors.black(不再 0xE6000000),保留顶部 Colors.white12 分隔线
    • 不再使用 BackdropFilter(背后是窗口底色,模糊没有意义)
  • 浅色分支:原样保留 ClipRect + BackdropFilter + SafeArea + backgroundColor.withValues(alpha: 0.95)
  • barKey 仍挂在 navHeight 的导航条 Container 上,总高度在无安全区时为 AppDimens.navHeight

测试

  • 现有 test/home/app_bottom_nav_test.dart 的高度断言(无安全区 = navHeight)必须继续通过
  • 新增用例:dark: true 且 MediaQuery 底部安全区为 34 时,
    1. AppBottomNav 总高度 = navHeight + 34
    2. 最外层 ColoredBox(或等价背景)颜色为 Colors.black

验收

  • 门禁:dart analyze lib test 零告警、flutter test 全过、flutter build apk --debug 成功。
  • 真机自查:首页底部导航与其下方手势条区域为同一种纯黑,无浅色边。

Git

  • 从 develop 拉 fix/home-nav-safe-area-color。
  • 提交:fix(home): 首页深色底部导航补齐安全区底色,作者 Zhou Weidong <502333560@qq.com>。
  • --no-ff 合回 develop 并 push;FruitServer/docs/plans/PROGRESS.md 追加 K71-A 留痕。

约束

  • 全程中文;禁止 git add -A;不改浅色模式观感与其它页面;完成后停住等待验收。