feat: change progress display

This commit is contained in:
Simon Ding
2024-07-31 16:55:01 +08:00
parent b337e40fcc
commit 1340305f2d
3 changed files with 51 additions and 34 deletions

View File

@@ -40,7 +40,7 @@ class WelcomePage extends ConsumerWidget {
))
]
: List.generate(value.length, (i) {
var item = value[i];
final item = value[i];
return Card(
margin: const EdgeInsets.all(4),
clipBehavior: Clip.hardEdge,
@@ -68,14 +68,15 @@ class WelcomePage extends ConsumerWidget {
children: [
LinearProgressIndicator(
value: 1,
color: item.status == "downloaded"
color: item.downloadedNum ==
item.monitoredNum
? Colors.green
: Colors.blue,
),
Text(
item.name!,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
height: 2.5),