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

@@ -87,7 +87,7 @@ class _OrderConfirmationPageState extends State<OrderConfirmationPage> {
}
Future<void> _goToPage() async {
final Uri url = Uri.parse('https://google.com');
final Uri url = Uri.parse('https://example.org');
if (!await launchUrl(url, webOnlyWindowName: '_blank')) {
throw 'Could not launch $url';
}
@@ -115,10 +115,22 @@ class _OrderConfirmationPageState extends State<OrderConfirmationPage> {
final item = cartItems[index];
return OrderConfirmItemCard(
name: shortString(item.title),
image: Image(
image: NetworkImage(item.images[0].url),
width: 50,
height: 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,
height: 50,
);
} else {
return const CircularProgressIndicator();
}
},
),
price: item.price,
count: item.localCount,
);
@@ -165,15 +177,6 @@ class _OrderConfirmationPageState extends State<OrderConfirmationPage> {
),
),
),
CheckboxListTile(
title: const Text('Согласен с обаботкой персональных данных'),
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = value!;
});
},
),
ElevatedButton(
onPressed: () async {
_goToPage();