copyWith method
recommend you follow the next action type from the documentation.
Implementation
PaymentIntentNextAction copyWith({
String? type,
Redirect? redirect,
}) {
return PaymentIntentNextAction(
type: type ?? this.type,
redirect: redirect ?? this.redirect,
);
}