feat: Add download speed to progress bar

This commit is contained in:
PartyDonut 2025-08-29 19:29:47 +02:00
parent d22d340181
commit 5a5a4e4703
7 changed files with 95 additions and 68 deletions

View file

@ -35,11 +35,19 @@ class SyncButton extends ConsumerWidget {
),
SizedBox.fromSize(
size: const Size.fromRadius(10),
child: CircularProgressIndicator(
strokeCap: StrokeCap.round,
strokeWidth: 1.5,
color: status.color(context),
value: status == TaskStatus.running ? progress.clamp(0.0, 1.0) : 0,
child: TweenAnimationBuilder(
duration: const Duration(milliseconds: 250),
curve: Curves.easeInOut,
tween: Tween<double>(
begin: 0,
end: progress,
),
builder: (context, value, child) => CircularProgressIndicator(
strokeCap: StrokeCap.round,
strokeWidth: 2,
color: status.color(context),
value: status == TaskStatus.running ? value.clamp(0.0, 1.0) : 0,
),
),
),
],