merge: 合并 K29.5 进度条保留修正
This commit is contained in:
commit
08440b0160
2 files changed
+26
-12
No files matched your search
@@ -146,7 +146,11 @@ class PlayerPlaybackOverlay extends StatelessWidget {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [if (controlsVisible) _bottomInfo(context), _bottomActions()],
|
children: [
|
||||||
|
if (controlsVisible) _bottomInfo(context),
|
||||||
|
_bottomProgress(),
|
||||||
|
_bottomActions(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -171,22 +175,28 @@ class PlayerPlaybackOverlay extends StatelessWidget {
|
|||||||
authorNote: data.authorNote,
|
authorNote: data.authorNote,
|
||||||
textScale: data.textScale,
|
textScale: data.textScale,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 2),
|
|
||||||
SeekProgressBar(
|
|
||||||
key: const Key('player-progress'),
|
|
||||||
valueListenable: data.controller,
|
|
||||||
semanticsLabel: data.l10n.seekVideo,
|
|
||||||
showTimes: true,
|
|
||||||
compact: true,
|
|
||||||
inactiveTrackColor: Colors.white24,
|
|
||||||
onScrubStart: actions.onScrubStart,
|
|
||||||
onSeek: actions.onSeek,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _bottomProgress() {
|
||||||
|
return Padding(
|
||||||
|
key: const Key('player-progress-container'),
|
||||||
|
padding: EdgeInsets.fromLTRB(14, controlsVisible ? 2 : 8, 14, 0),
|
||||||
|
child: SeekProgressBar(
|
||||||
|
key: const Key('player-progress'),
|
||||||
|
valueListenable: data.controller,
|
||||||
|
semanticsLabel: data.l10n.seekVideo,
|
||||||
|
showTimes: true,
|
||||||
|
compact: true,
|
||||||
|
inactiveTrackColor: Colors.white24,
|
||||||
|
onScrubStart: actions.onScrubStart,
|
||||||
|
onSeek: actions.onSeek,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _detailRow(String series) {
|
Widget _detailRow(String series) {
|
||||||
return Material(
|
return Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ void main() {
|
|||||||
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
||||||
expect(find.byType(PlayerCenterToggle), findsOneWidget);
|
expect(find.byType(PlayerCenterToggle), findsOneWidget);
|
||||||
expect(
|
expect(
|
||||||
@@ -246,6 +247,7 @@ void main() {
|
|||||||
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-bottom-clear-screen')), findsOneWidget);
|
expect(find.byKey(const Key('player-bottom-clear-screen')), findsOneWidget);
|
||||||
|
|
||||||
@@ -440,6 +442,7 @@ void main() {
|
|||||||
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
||||||
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);
|
||||||
});
|
});
|
||||||
@@ -456,6 +459,7 @@ void main() {
|
|||||||
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
expect(find.byKey(const Key('player-controls-top')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
expect(find.byKey(const Key('player-controls-bottom')), findsNothing);
|
||||||
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
expect(find.byKey(const Key('player-bottom-actions')), findsOneWidget);
|
||||||
|
expect(find.byKey(const Key('player-progress')), findsOneWidget);
|
||||||
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
expect(find.byKey(const Key('player-interaction-rail')), findsNothing);
|
||||||
expect(find.byType(PlayerCenterToggle), findsNothing);
|
expect(find.byType(PlayerCenterToggle), findsNothing);
|
||||||
expect(find.byTooltip('Exit clear screen'), findsOneWidget);
|
expect(find.byTooltip('Exit clear screen'), findsOneWidget);
|
||||||
|
|||||||
Reference in new issue
Block a user