CardFieldInputDetails constructor

  1. @JsonSerializable(explicitToJson: true)
const CardFieldInputDetails({
  1. required bool complete,
  2. String? last4,
  3. int? expiryMonth,
  4. int? expiryYear,
  5. String? postalCode,
  6. String? brand,
  7. String? number,
  8. String? cvc,
  9. @Default(CardValidationState.Unknown) CardValidationState validExpiryDate,
  10. @Default(CardValidationState.Unknown) CardValidationState validCVC,
  11. @Default(CardValidationState.Unknown) CardValidationState validNumber,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory CardFieldInputDetails({
  /// Indicates whether the card field input is complete.
  required bool complete,

  /// Last 4 digits of the entered card number.
  String? last4,

  /// Month of the entered expiry date of the card.
  int? expiryMonth,

  /// Year of the entered expiry date of the card.
  int? expiryYear,

  /// Entered postcal code.
  String? postalCode,

  /// Brand of the card.
  String? brand,

  /// Card number.
  /// This information is not available by default to comply with the PCI compliance
  String? number,

  /// CVC code.
  /// This information is not available by default to comply with the PCI compliance
  String? cvc,

  /// The [CardValidationState] of the entered expiry date.
  @Default(CardValidationState.Unknown) CardValidationState validExpiryDate,

  /// The [CardValidationState] of the entered cvc.
  @Default(CardValidationState.Unknown) CardValidationState validCVC,

  /// The [CardValidationState] of the entered card number.
  @Default(CardValidationState.Unknown) CardValidationState validNumber,
}) = _CardFieldInputDetails;