refa: video progress indicator

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-18 22:21:48 +08:00
parent f5657d2d4c
commit 395893fc7d
7 changed files with 193 additions and 35 deletions

View File

@@ -63,6 +63,7 @@ class VideoCardH extends StatelessWidget {
title: videoItem.title,
cover: videoItem.cover,
);
final colorScheme = ColorScheme.of(context);
return Material(
type: MaterialType.transparency,
child: Stack(
@@ -166,8 +167,11 @@ class VideoCardH extends StatelessWidget {
left: 0,
bottom: 0,
right: 0,
child: videoProgressIndicator(
progress == -1
child: VideoProgressIndicator(
color: colorScheme.primary,
backgroundColor:
colorScheme.secondaryContainer,
progress: progress == -1
? 1
: progress / videoItem.duration,
),