From 2d7aa98a8c9d7d2394f920d0540a9bee9126329c Mon Sep 17 00:00:00 2001 From: Adminixtrator Date: Sat, 19 Nov 2022 15:10:34 +0100 Subject: [PATCH] update package example --- README.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index df77ecd..b52d449 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,10 @@ class CheckOut extends StatelessWidget { @override Widget build(BuildContext context) { return TextButton( - onPressed: () => SeerbitMethod.startPayment( + onPressed: () => + SeerbitMethod.startPayment( context, - PayloadModel( + payload: PayloadModel( currency: 'NGN', email: "dummyemail@mail.com", description: "A pair of new shoes", @@ -55,25 +56,25 @@ class CheckOut extends StatelessWidget { setAmountByCustomer: false, pocketRef: "", vendorId: "", - customization: CustomizationModel( - borderColor: "#000000", - backgroundColor: "#004C64", - buttonColor: "#0084A0", - paymentMethod: [PayChannel.card,PayChannel.account, PayChannel.transfer], - confetti: false, - logo: "logo_url || base64", - ) - ), + customization: const CustomizationModel( + borderColor: "#000000", + backgroundColor: "#004C64", + buttonColor: "#0084A0", + paymentMethod: [PayChannel.card, PayChannel.account, PayChannel.transfer], + confetti: false, + logo: "logo_url || base64", + ) + ), onSuccess: (response) {}, onCancel: (_) {}), - ), - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.red), - ), - child: Text( - 'Checkout', - style: TextStyle(color: Colors.white), - )); + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Colors.red), + ), + child: const Text( + 'Checkout', + style: TextStyle(color: Colors.white), + ), + ); } } @@ -91,4 +92,7 @@ This ends the payment and removes the checkout view from the screen. + + +