mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feat: Add download speed to progress bar
This commit is contained in:
parent
d22d340181
commit
5a5a4e4703
7 changed files with 95 additions and 68 deletions
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue