chore: change ui

This commit is contained in:
Simon Ding
2024-07-26 12:54:37 +08:00
parent 6a9f63fff6
commit 690ce272c2

View File

@@ -48,49 +48,28 @@ class WelcomePage extends ConsumerWidget {
SizedBox(
width: 130,
height: 195,
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Stack(
alignment: AlignmentDirectional.topEnd,
children: [
Image.network(
"${APIs.imagesUrl}/${item.id}/poster.jpg",
fit: BoxFit.fill,
headers: APIs.authHeaders,
),
Padding(
padding: const EdgeInsets.all(10),
child: () {
if (item.mediaType == "tv") {
return Text("");
}
var icon = const CircleAvatar(
radius: 12,
backgroundColor: Colors.black12,
child: Icon(
Icons.access_time_rounded,
color: Colors.blue,
size: 24,
),
);
if (item.status == "downloaded") {
icon = const CircleAvatar(
radius: 12,
backgroundColor: Colors.black12,
child: Icon(
Icons.done_rounded,
color: Colors.green,
size: 24,
),
);
}
return icon;
}(),
)
],
),
child: Image.network(
"${APIs.imagesUrl}/${item.id}/poster.jpg",
fit: BoxFit.fill,
headers: APIs.authHeaders,
),
),
SizedBox(
width: 130,
child: () {
if (item.mediaType == "movie" &&
item.status == "downloaded") {
return const LinearProgressIndicator(
value: 1,
color: Colors.green,
);
}
return const LinearProgressIndicator(
value: 1,
color: Colors.blue,
);
}(),
),
Text(
item.name!,
style: const TextStyle(