fix(flutter): 重做评论面板视觉

This commit is contained in:
Zhou Weidong committed 2026-10-20 12:11:44 +08:00
1 parent ced1ec3d9e
commit 9493ad23bb
4 files changed
+89 -28

No files matched your search

+17 -6
View File
@@ -129,7 +129,7 @@ void main() {
expect(tester.widget<TextField>(input).focusNode?.hasFocus, isFalse);
});
testWidgets('should_use_compact_comment_sizes', (tester) async {
testWidgets('should_use_polished_comment_sizes', (tester) async {
final repository = FakeCommentRepository(
pages: [
CommentPage(
@@ -142,19 +142,30 @@ void main() {
expect(
tester.getSize(find.byKey(const Key('comment-post'))),
const Size(32, 32),
const Size(36, 36),
);
expect(tester.getSize(find.byKey(const Key('comment-input'))).height, 44);
expect(
find.byKey(const Key('player-comments-drag-handle')),
findsOneWidget,
);
expect(tester.getSize(find.byKey(const Key('comment-input'))).height, 40);
final avatar = tester.widget<CircleAvatar>(
find.descendant(
of: find.byKey(const Key('comment-item-10')),
matching: find.byType(CircleAvatar),
),
);
expect(avatar.radius, 14);
expect(avatar.radius, 16);
final body = tester.widget<Text>(find.text('Great episode'));
expect(body.style?.fontSize, 13);
expect(body.style?.height, 1.2);
expect(body.style?.fontSize, 14);
expect(body.style?.height, 1.4);
expect(
tester
.widget<TextField>(find.byKey(const Key('comment-input')))
.decoration
?.fillColor,
AppColors.commentInput,
);
});
testWidgets('should_show_review_badge_and_server_replaced_content', (