From 90769de3b7964b162a5e657c89892ad8498ae3fb Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Tue, 20 Oct 2026 12:19:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(flutter):=20=E9=80=89=E9=9B=86=E6=9D=A1?= =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E9=9D=A0=E5=8F=B3=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/player/widgets/player_overlay.dart | 4 ++-- test/player/player_fullscreen_test.dart | 24 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/pages/player/widgets/player_overlay.dart b/lib/pages/player/widgets/player_overlay.dart index 1553013..6b404c8 100644 --- a/lib/pages/player/widgets/player_overlay.dart +++ b/lib/pages/player/widgets/player_overlay.dart @@ -259,7 +259,7 @@ class PlayerPlaybackOverlay extends StatelessWidget { ), child: Row( children: [ - Flexible( + Expanded( child: Text( '${data.l10n.episodes} · ' '${data.l10n.allEpisodesBadge(data.totalEpisodes)} · ' @@ -274,7 +274,7 @@ class PlayerPlaybackOverlay extends StatelessWidget { ), ), ), - const SizedBox(width: 3), + const SizedBox(width: 8), const Icon( Icons.keyboard_arrow_up_rounded, color: AppColors.onPrimary, diff --git a/test/player/player_fullscreen_test.dart b/test/player/player_fullscreen_test.dart index 3928ed4..9a938f0 100644 --- a/test/player/player_fullscreen_test.dart +++ b/test/player/player_fullscreen_test.dart @@ -286,6 +286,30 @@ void main() { expect(find.byKey(const Key('player-interaction-rail')), findsOneWidget); }); + testWidgets('should_push_episodes_arrow_to_pill_right', (tester) async { + // 宽屏下文案不会撑满胶囊,才能验证箭头是否被推到最右侧。 + await _pumpApp(tester, size: const Size(900, 844)); + await _openSeriesPlayer(tester); + + final pill = tester.getRect(find.byKey(const Key('player-episodes-pill'))); + final label = tester.getRect( + find + .descendant( + of: find.byKey(const Key('player-episodes-pill')), + matching: find.byType(Text), + ) + .first, + ); + final arrow = tester.getRect( + find.descendant( + of: find.byKey(const Key('player-episodes-pill')), + matching: find.byIcon(Icons.keyboard_arrow_up_rounded), + ), + ); + expect(pill.right - arrow.right, closeTo(14, 0.5)); + expect(arrow.left - label.right, closeTo(8, 0.5)); + }); + testWidgets('should_show_rail_counts_from_detail_and_follow_server_results', ( tester, ) async {