60 lines
2.5 KiB
Markdown
60 lines
2.5 KiB
Markdown
# INBOX
|
||
|
||
## [已处理] K83-A 右侧互动栏改用参考图同款图标资源
|
||
|
||
### 背景
|
||
|
||
K82-A 用 Material 图标替换后,形状与参考图仍不一致(星形/气泡/心形/分享箭头细节不同),
|
||
且 Material 字形自带内边距,视觉上比参考图小。
|
||
|
||
已从产品提供的参考图中提取出四个图标(白色 + 透明通道,保留原始形状与相对大小),
|
||
放在仓库 `assets/icon/rail/`:
|
||
|
||
- `rail_save.png`(收藏,实心星)
|
||
- `rail_comment.png`(评论,带三个点的气泡)
|
||
- `rail_like.png`(喜欢,实心心形)
|
||
- `rail_share.png`(分享,弯向右的箭头)
|
||
|
||
### 改动
|
||
|
||
1. `pubspec.yaml`
|
||
- `flutter.assets` 增加 `assets/icon/rail/`(目录)
|
||
2. `lib/pages/player/widgets/interaction_rail.dart`
|
||
- `InteractionRailItem` 的 `IconData icon / activeIcon` 改为 `String asset`
|
||
(`selected` 只决定颜色,不再切换图标)
|
||
- 渲染改为:
|
||
```dart
|
||
Image.asset(
|
||
item.asset,
|
||
width: _iconSize,
|
||
height: _iconSize,
|
||
fit: BoxFit.contain,
|
||
color: item.selected ? AppColors.blue : Colors.white,
|
||
colorBlendMode: BlendMode.srcIn,
|
||
)
|
||
```
|
||
- `_iconSize`:`30` → `32`;`_buttonSize` 保持 `44`;`_itemGap`:`22` → `24`
|
||
- 删除 K82-A 引入的 `mirrorIcon`(新资源本身已朝右)
|
||
3. `lib/pages/player/widgets/home_feed_overlay.dart` 与 `player_overlay.dart`
|
||
- 四项分别传:`assets/icon/rail/rail_save.png`、`rail_comment.png`、`rail_like.png`、`rail_share.png`
|
||
4. 测试
|
||
- 把 `find.byIcon(Icons.star_rounded / favorite_rounded / reply_rounded / ios_share_rounded …)` 类断言
|
||
改为查找对应 `Image.asset`(或用 Key 定位后断言 `Image.image` 的 asset 名)
|
||
- Key(`rail-save`、`rail-comments`、`rail-like`、`rail-share`、`player-rail-*`、计数 Key)保持不变
|
||
|
||
### 验收
|
||
|
||
- 门禁:`dart analyze lib test` 零告警、`flutter test` 全过、`flutter build apk --debug` 成功。
|
||
- 真机自查:首页 feed 与全屏播放页右侧四个图标与参考图形状一致,大小一致,无深色圆底。
|
||
|
||
### Git
|
||
|
||
- 从 `develop` 拉 `feat/rail-icon-assets`。
|
||
- 提交:`feat(player): 互动栏改用参考图同款图标资源`,作者 `Zhou Weidong <502333560@qq.com>`。
|
||
- `--no-ff` 合回 `develop` 并 push;`FruitServer/docs/plans/PROGRESS.md` 追加 K83-A 留痕。
|
||
|
||
### 约束
|
||
|
||
- 全程中文;禁止 `git add -A`;图标资源已放到 `assets/icon/rail/`,不要重新绘制或改动形状;
|
||
不改互动逻辑与 Key;完成后停住等待验收。
|