copyWith method

CardData copyWith({
  1. String? id,
  2. int? bin,
  3. String? maskedCard,
  4. int? expiryMonth,
  5. int? expiryYear,
  6. String? nickname,
  7. String? brand,
  8. String? cardType,
  9. Customer? customer,
})

Implementation

CardData copyWith({
  String? id,
  int? bin,
  String? maskedCard,
  int? expiryMonth,
  int? expiryYear,
  String? nickname,
  String? brand,
  String? cardType,
  Customer? customer,
}) =>
    CardData(
      id: id ?? this.id,
      bin: bin ?? this.bin,
      maskedCard: maskedCard ?? this.maskedCard,
      expiryMonth: expiryMonth ?? this.expiryMonth,
      expiryYear: expiryYear ?? this.expiryYear,
      nickname: nickname ?? this.nickname,
      brand: brand ?? this.brand,
      cardType: cardType ?? this.cardType,
      customer: customer ?? this.customer,
    );