fix(player): 调整 rail 倍速弹窗与进度时间

This commit is contained in:
Zhou Weidong committed 2026-10-19 17:44:06 +08:00
1 parent 87628e7d10
commit 4d7173d035
5 files changed
+88 -42

No files matched your search

+24 -32
View File
@@ -683,37 +683,7 @@ class _PlaybackOverlayState extends State<_PlaybackOverlay> {
key: const Key('player-controls-visible'),
children: [
_topBar(context),
Expanded(
child: Stack(
children: [
Positioned(
right: 10,
bottom: 14,
child: Material(
color: Colors.transparent,
child: InkWell(
key: const Key('player-speed'),
onTap: widget.onSpeedTap,
borderRadius: BorderRadius.circular(6),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 2,
),
child: Text(
_speedLabel(widget.playbackSpeed),
style: const TextStyle(
color: Color(0xFFDDDDDD),
fontSize: 9,
),
),
),
),
),
),
],
),
),
const Spacer(),
Padding(
key: const Key('player-controls-bottom'),
padding: const EdgeInsets.fromLTRB(14, 8, 14, 12),
@@ -723,7 +693,7 @@ class _PlaybackOverlayState extends State<_PlaybackOverlay> {
key: const Key('player-progress'),
valueListenable: widget.controller,
semanticsLabel: widget.l10n.seekVideo,
showTimes: false,
showTimes: true,
onScrubStart: widget.onScrubStart,
onSeek: widget.onSeek,
),
@@ -886,6 +856,28 @@ class _PlaybackOverlayState extends State<_PlaybackOverlay> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
key: const Key('player-more-speed'),
leading: const Icon(
Icons.speed_rounded,
color: AppColors.secondary,
),
title: Text(widget.l10n.playbackSpeed),
trailing: Text(
_speedLabel(widget.playbackSpeed),
style: const TextStyle(
color: AppColors.blue,
fontSize: 12,
fontWeight: FontWeight.w600,
),
),
onTap: () {
Navigator.pop(sheetContext);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) widget.onSpeedTap();
});
},
),
ListTile(
key: const Key('player-more-download'),
leading: const Icon(
@@ -55,7 +55,7 @@ class HomeFeedOverlay extends StatelessWidget {
_header(context),
Expanded(
child: Align(
alignment: Alignment.centerRight,
alignment: const Alignment(1.0, 0.45),
child: Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 12, 16),
child: _rail(),