Getting null check exception in shipping address(type 'Null' is not a subtype of type 'String' in type cast). but payment is getting successful. #494
Description
Describe the bug
payment_intents.g.dart
type 'Null' is not a subtype of type 'String' in type cast
this where we are getting null check exception added image for that.
To Reproduce
Steps to reproduce the behavior:
-
Googlepay using pay plugin payment is getting success.
-
Then we are adding google pay token to stripe.
final token =
paymentResult['paymentMethodData']['tokenizationData']['token'];
final tokenJson = Map.castFrom(json.decode(token));
print(tokenJson);
print("$token{tokenJson['id']}");
print("Here the whole data is printing");final params = PaymentMethodParams.cardFromToken(
token: tokenJson['id'],
);//PaymentMethodParams.afterpayClearpay(shippingDetails: ShippingDetails())
// 3. Confirm Google pay payment method
await Stripe.instance.confirmPayment(
clientSecret,
params,
); -
Here we are getting null check exception …
Expected behavior
payment should be done without any exception.
Smartphone / tablet
- Device: [Samsung galaxy A52]
- OS: [ Android 11]
- Package version: [^2.0.2]
- Flutter version [ 2.2.8.]
Additional context
Add any other context about the problem here.