copyWith method

CardModel copyWith({
  1. int? id,
  2. String? cardNumber,
  3. String? expiryDate,
})

Implementation

CardModel copyWith({
  int? id,
  String? cardNumber,
  String? expiryDate,
}) =>
    CardModel(
      id: id ?? this.id,
      cardNumber: cardNumber ?? this.cardNumber,
      expiryDate: expiryDate ?? this.expiryDate,
    );