mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 06:19:35 +00:00
更改跳过首尾方式
This commit is contained in:
parent
5abf938dcf
commit
66439018fb
9 changed files with 150 additions and 67 deletions
|
|
@ -33,12 +33,14 @@ class AudiobookChapterProgressBar extends HookConsumerWidget {
|
|||
? null
|
||||
: (player.bufferedPositionInBook - currentChapter.start);
|
||||
|
||||
final progress =
|
||||
currentChapterProgress ?? position.data ?? const Duration(seconds: 0);
|
||||
final total = currentChapter == null
|
||||
? player.book?.duration ?? const Duration(seconds: 0)
|
||||
: currentChapter.end - currentChapter.start;
|
||||
return ProgressBar(
|
||||
progress:
|
||||
currentChapterProgress ?? position.data ?? const Duration(seconds: 0),
|
||||
total: currentChapter == null
|
||||
? player.book?.duration ?? const Duration(seconds: 0)
|
||||
: currentChapter.end - currentChapter.start,
|
||||
progress: progress,
|
||||
total: total,
|
||||
// ! TODO add onSeek
|
||||
onSeek: (duration) {
|
||||
player.seekInBook(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue