Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-15 12:38:12 +08:00
parent 14ae61f891
commit 4cfcf18bc9
3 changed files with 25 additions and 20 deletions

View File

@@ -593,6 +593,22 @@ class _AudioPageState extends State<AudioPage> {
);
}
void _onDragStart(ThumbDragDetails details) {
// do nothing
}
void _onDragUpdate(ThumbDragDetails details) {
_controller
..isDragging = true
..position.value = details.timeStamp;
}
void _onSeek(Duration value) {
_controller
..player?.platform?.seek(value)
..isDragging = false;
}
Widget _buildProgressBar(ColorScheme colorScheme) {
final primary = colorScheme.primary;
final thumbGlowColor = primary.withAlpha(80);
@@ -611,17 +627,9 @@ class _AudioPageState extends State<AudioPage> {
thumbGlowColor: thumbGlowColor,
thumbGlowRadius: 0,
thumbRadius: 6,
onDragStart: (_) {},
onDragUpdate: (details) {
_controller
..isDragging = true
..position.value = details.timeStamp;
},
onSeek: (value) {
_controller
..player?.platform?.seek(value)
..isDragging = false;
},
onDragStart: _onDragStart,
onDragUpdate: _onDragUpdate,
onSeek: _onSeek,
);
if (Utils.isDesktop) {
return MouseRegion(