copyWith method

  1. @override
PaymentProviderStripe copyWith({
  1. String? publishableKey,
  2. bool? needCountry,
  3. bool? needPostalCode,
  4. bool? needCardholderName,
})
override

Copy model with modified properties.

Properties:

  • publishable_key: Stripe API publishable key
  • need_country: True, if the user country must be provided
  • need_postal_code: True, if the user ZIP/postal code must be provided
  • need_cardholder_name: True, if the cardholder name must be provided

Implementation

@override
PaymentProviderStripe copyWith({
  String? publishableKey,
  bool? needCountry,
  bool? needPostalCode,
  bool? needCardholderName,
}) =>
    PaymentProviderStripe(
      publishableKey: publishableKey ?? this.publishableKey,
      needCountry: needCountry ?? this.needCountry,
      needPostalCode: needPostalCode ?? this.needPostalCode,
      needCardholderName: needCardholderName ?? this.needCardholderName,
    );