fix(flutter): 加速态隐藏底部选集与清屏按钮
This commit is contained in:
1 parent
96074bc5e8
commit
033ae5987c
2 files changed
+11
-1
No files matched your search
@@ -170,7 +170,8 @@ class PlayerPlaybackOverlay extends StatelessWidget {
|
|||||||
if (controlsVisible) _bottomInfo(context),
|
if (controlsVisible) _bottomInfo(context),
|
||||||
if (data.boosting) _boostHint(),
|
if (data.boosting) _boostHint(),
|
||||||
_bottomProgress(),
|
_bottomProgress(),
|
||||||
_bottomActions(),
|
// 加速态只保留进度条与提示,便于全屏快进时看清画面。
|
||||||
|
if (!data.boosting) _bottomActions(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -184,6 +184,8 @@ void main() {
|
|||||||
|
|
||||||
expect(find.byKey(const Key('player-speed-boost-hint')), findsOneWidget);
|
expect(find.byKey(const Key('player-speed-boost-hint')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-episodes-pill')), findsNothing);
|
||||||
|
expect(find.byKey(const Key('player-bottom-clear-screen')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
||||||
expect(
|
expect(
|
||||||
@@ -200,6 +202,8 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
expect(find.byKey(const Key('player-speed-boost-hint')), findsNothing);
|
expect(find.byKey(const Key('player-speed-boost-hint')), findsNothing);
|
||||||
|
expect(find.byKey(const Key('player-episodes-pill')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-bottom-clear-screen')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsOneWidget);
|
expect(find.byKey(const Key('player-interaction-rail')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsOneWidget);
|
expect(find.byKey(const Key('player-controls-bottom')), findsOneWidget);
|
||||||
expect(
|
expect(
|
||||||
@@ -232,6 +236,8 @@ void main() {
|
|||||||
await tester.pump(const Duration(milliseconds: 700));
|
await tester.pump(const Duration(milliseconds: 700));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.byKey(const Key('player-speed-boost-hint')), findsOneWidget);
|
expect(find.byKey(const Key('player-speed-boost-hint')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-episodes-pill')), findsNothing);
|
||||||
|
expect(find.byKey(const Key('player-bottom-clear-screen')), findsNothing);
|
||||||
await gesture.up();
|
await gesture.up();
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
@@ -239,6 +245,9 @@ void main() {
|
|||||||
expect(find.byKey(const Key('player-speed-boost-hint')), findsNothing);
|
expect(find.byKey(const Key('player-speed-boost-hint')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
||||||
expect(find.byTooltip('Exit clear screen'), findsOneWidget);
|
expect(find.byTooltip('Exit clear screen'), findsOneWidget);
|
||||||
|
// 清屏态本来显示的选集胶囊与右下按钮,在加速结束后恢复。
|
||||||
|
expect(find.byKey(const Key('player-episodes-pill')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-bottom-clear-screen')), findsOneWidget);
|
||||||
expect(
|
expect(
|
||||||
find.descendant(
|
find.descendant(
|
||||||
of: find.byKey(const Key('player-speed-entry')),
|
of: find.byKey(const Key('player-speed-entry')),
|
||||||
|
|||||||
Reference in new issue
Block a user