fix(player): 收紧推荐页互动栏间距

This commit is contained in:
Zhou Weidong committed 2026-10-27 09:37:00 +08:00
1 parent d3dbc9f8dc
commit 4c3acb047c
5 files changed
+34 -32

No files matched your search

+8 -14
View File
@@ -346,7 +346,7 @@ void main() {
);
expect(saveImage.color, AppColors.onPrimary);
expect(find.byKey(const Key('rail-comments')), findsOneWidget);
expect(find.byKey(const Key('rail-share')), findsOneWidget);
expect(find.byKey(const Key('rail-share')), findsNothing);
expect(
tester.widget<Text>(find.byKey(const Key('rail-comments-count'))).data,
'12',
@@ -364,19 +364,6 @@ void main() {
.assetName,
'assets/icon/rail/rail_comment.png',
);
expect(
(tester
.widget<Image>(
find.descendant(
of: find.byKey(const Key('rail-share')),
matching: find.byType(Image),
),
)
.image
as AssetImage)
.assetName,
'assets/icon/rail/rail_share.png',
);
expect(find.byKey(const Key('rail-episodes')), findsOneWidget);
expect(
find.descendant(
@@ -385,6 +372,13 @@ void main() {
),
findsOneWidget,
);
final saveRect = tester.getRect(find.byKey(const Key('rail-save')));
final likeRect = tester.getRect(find.byKey(const Key('rail-like')));
final commentsRect = tester.getRect(find.byKey(const Key('rail-comments')));
final episodesRect = tester.getRect(find.byKey(const Key('rail-episodes')));
expect(likeRect.top - saveRect.bottom, closeTo(14, 0.1));
expect(commentsRect.top - likeRect.bottom, closeTo(14, 0.1));
expect(episodesRect.top - commentsRect.bottom, closeTo(14, 0.1));
expect(
tester.getRect(find.byKey(const Key('home-feed-action-rail'))).right,
closeTo(
+11
View File
@@ -1351,6 +1351,17 @@ void main() {
expect(shareImage.width, 32);
expect(shareImage.height, 32);
expect(shareImage.colorBlendMode, BlendMode.srcIn);
final saveRect = tester.getRect(find.byKey(const Key('player-rail-save')));
final commentsRect = tester.getRect(
find.byKey(const Key('player-rail-comments')),
);
final likeRect = tester.getRect(find.byKey(const Key('player-rail-like')));
final shareRect = tester.getRect(
find.byKey(const Key('player-rail-share')),
);
expect(commentsRect.top - saveRect.bottom, closeTo(24, 0.1));
expect(likeRect.top - commentsRect.bottom, closeTo(24, 0.1));
expect(shareRect.top - likeRect.bottom, closeTo(24, 0.1));
final saveButton = tester.widget<IconButton>(
find.descendant(