Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 调整应用页(WhitelistPage)搜索区域的吸顶行为与吸顶时的颜色规则,使仅搜索框吸顶,并在吸顶状态下让搜索容器背景与顶部栏滚动叠色规则保持一致。
Changes:
- 将“已启用 xxx”说明文本从搜索组件中拆出,改为随列表滚动、不吸顶的 SliverToBoxAdapter。
- 新增吸顶的 SliverPersistentHeader,仅搜索框区域 pinned,并根据 overlapsContent 计算吸顶容器背景色(surface tint overlay)。
- 为
AppListSearchHeader增加可配置的searchBarBackgroundColor,用于吸顶/非吸顶状态下搜索框底色差异。
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/widgets/app_list_widgets.dart | 为搜索头组件新增可选的搜索框背景色入参,并用于配置 SearchBar.backgroundColor。 |
| lib/pages/whitelist_page.dart | 拆分说明文本与搜索栏;新增 pinned 搜索栏 Sliver,并实现与 AppBar 一致的滚动叠色计算与吸顶样式。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| searchFocusNode: _searchFocus, | ||
| hintText: l10n.searchApps, | ||
| searchBarBackgroundColor: overlapsContent | ||
| ? Colors.white |
There was a problem hiding this comment.
searchBarBackgroundColor is set to Colors.white when the header is pinned. This hard-codes a light color and will look incorrect (and may reduce contrast) in dark theme / dynamic color. Consider deriving the pinned search bar background from the current ColorScheme (e.g., a surface/container token, or conditional on Theme.of(context).brightness).
| ? Colors.white | |
| ? cs.surfaceContainerHighest |
| : cs.surface; | ||
| return Material( | ||
| color: pinnedBg, | ||
| surfaceTintColor: Theme.of(context).colorScheme.surfaceTint, |
There was a problem hiding this comment.
surfaceTintColor is provided on this Material, but elevation is always 0, so the tint will not be applied by Material (and the actual background tinting is already handled via ElevationOverlay.applySurfaceTint). Consider removing surfaceTintColor to avoid confusion, or set elevation to match the intended scrolled-under behavior and let Material handle tinting.
| surfaceTintColor: Theme.of(context).colorScheme.surfaceTint, |
统一进度条调整的数字样式.
变更内容\n- 应用页中仅搜索框吸顶,\已启用xxx\文本不吸顶\n- 吸顶状态下,搜索容器背景按与顶部栏一致的滚动叠色规则计算\n- 吸顶后搜索框内部背景为白色\n\n## 影响文件\n- lib/pages/whitelist_page.dart\n- lib/widgets/app_list_widgets.dart\n\n## 验证\n- dart analyze 通过\n- 已完成 split-per-abi release 构建验证\n