修复章节列表滚动 在windows平台报错

This commit is contained in:
rang 2025-10-24 13:46:36 +08:00
parent 620a1eb7a2
commit 05bc0cde74
7 changed files with 32 additions and 12 deletions

View file

@ -165,7 +165,7 @@ class AudiobookPlayerPlayPauseButton extends HookConsumerWidget {
),
ProcessingState.completed => IconButton(
onPressed: () async {
await player.seek(const Duration(seconds: 0));
await player.seekInBook(const Duration(seconds: 0));
await player.play();
},
icon: const Icon(
@ -220,7 +220,7 @@ class AudiobookChapterProgressBar extends HookConsumerWidget {
: currentChapter.end - currentChapter.start,
// ! TODO add onSeek
onSeek: (duration) {
player.seek(
player.seekInBook(
duration + (currentChapter?.start ?? const Duration(seconds: 0)),
);
},