Fix: some changes

This commit is contained in:
2024-06-14 01:37:54 +03:00
parent f5e1407281
commit 73fe273c75
6 changed files with 52 additions and 26 deletions

View File

@@ -283,9 +283,22 @@ class _BasketPageState extends State<BasketPage> {
name: shortString(item.title),
price: item.price.toStringAsFixed(2),
id: item.id,
image: Image(
image: NetworkImage(item.images[0].url),
width: 50,
image: FutureBuilder(
future: precacheImage(
NetworkImage(item.images[0].url),
context),
builder: (context, snapshot) {
if (snapshot.connectionState ==
ConnectionState.done) {
return Image(
image: NetworkImage(
item.images[0].url),
width: 50,
);
} else {
return const CircularProgressIndicator();
}
},
),
onTapPlus: () =>
addItem(item.id.toString()),