mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-16 22:30:16 +08:00
refa: video progress indicator
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -224,8 +224,11 @@ class DetailItem extends StatelessWidget {
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
videoProgressIndicator(
|
||||
progress / entry.totalTimeMilli,
|
||||
VideoProgressIndicator(
|
||||
color: theme.colorScheme.primary,
|
||||
backgroundColor:
|
||||
theme.colorScheme.secondaryContainer,
|
||||
progress: progress / entry.totalTimeMilli,
|
||||
),
|
||||
PBadge(
|
||||
text: progress >= entry.totalTimeMilli - 400
|
||||
|
||||
@@ -157,8 +157,11 @@ class HistoryItem extends StatelessWidget {
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: videoProgressIndicator(
|
||||
item.progress == -1
|
||||
child: VideoProgressIndicator(
|
||||
color: theme.colorScheme.primary,
|
||||
backgroundColor:
|
||||
theme.colorScheme.secondaryContainer,
|
||||
progress: item.progress == -1
|
||||
? 1
|
||||
: item.progress! / item.duration!,
|
||||
),
|
||||
|
||||
@@ -136,8 +136,11 @@ class VideoCardHLater extends StatelessWidget {
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: videoProgressIndicator(
|
||||
progress == -1
|
||||
child: VideoProgressIndicator(
|
||||
color: theme.colorScheme.primary,
|
||||
backgroundColor:
|
||||
theme.colorScheme.secondaryContainer,
|
||||
progress: progress == -1
|
||||
? 1
|
||||
: progress / videoItem.duration!,
|
||||
),
|
||||
|
||||
@@ -141,8 +141,16 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
child: videoProgressIndicator(
|
||||
videoItem.history!.progress! /
|
||||
child: VideoProgressIndicator(
|
||||
color:
|
||||
theme.colorScheme.primary,
|
||||
backgroundColor: theme
|
||||
.colorScheme
|
||||
.secondaryContainer,
|
||||
progress:
|
||||
videoItem
|
||||
.history!
|
||||
.progress! /
|
||||
videoItem
|
||||
.history!
|
||||
.duration!,
|
||||
|
||||
Reference in New Issue
Block a user