flutter_stripe_payment
flutter_stripe_payment copied to clipboard
Attempt to execute code removed by Dart AOT compiler (TFA)
I added the package to my app end everything was working fine in debug mode. I created a release apk and was testing over my real android device. The following error:
Attempt to execute code removed by Dart AOT compiler (TFA)
My code for the payment function:
static Future getclientsecret(String stripeid,String proposalid)async{
var res=await http.get("https://us-central1-festful-60c12.cloudfunctions.net/createpaymentIntent",headers:{
"stripeid":stripeid,
"proposalid":proposalid
});
var data=await jsonDecode(res.body);
//print(data);
return data;
}
static Future<PaymentIntentResult> pay(String stripeid,String proposalid)async{
StripePayment.setOptions(
StripeOptions(
publishableKey:"pk_test_51IRnwc.........",
merchantId: "Test",
androidPayMode: 'test'
));
var clientsecret=await PaymentUtils.getclientsecret(stripeid,proposalid);
var paymentmethod = await StripePayment.paymentRequestWithCardForm(CardFormPaymentRequest());
log(paymentmethod.toJson().toString());
var payment=await StripePayment.confirmPaymentIntent(
PaymentIntent(
clientSecret: clientsecret['client_secret'],
paymentMethodId:paymentmethod.id,
),
);
return payment;
}
The versions I am using are :
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (8 weeks ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
Is this related to the latest version of flutter since the package was updated in the 15th of march. ??