From 9efce3ae85ed235e27b5a93c8b2c5c324e196360 Mon Sep 17 00:00:00 2001 From: Hitesh Ale Date: Sun, 26 Feb 2023 17:32:16 -0500 Subject: [PATCH] hi --- lib/buy.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/buy.dart b/lib/buy.dart index 48c7fe3..f0af5da 100644 --- a/lib/buy.dart +++ b/lib/buy.dart @@ -773,7 +773,7 @@ class _BuyScreenState extends State { // add close button ElevatedButton( onPressed: () async { - Navigator.pop(context); + try { // 1. create payment intent on the server int price = (SellerPrice*100).toInt(); @@ -804,9 +804,9 @@ class _BuyScreenState extends State { ); rethrow; } - + await Stripe.instance.presentPaymentSheet(); - +Navigator.pop(context); }, child: Text(