copyWith method

TransactionBase copyWith({
  1. TransactionBaseTransactionType? transactionType,
  2. String? pendingTransactionId,
  3. String? categoryId,
  4. List<String>? category,
  5. Location? location,
  6. PaymentMeta? paymentMeta,
  7. String? accountOwner,
  8. String? name,
  9. String? originalDescription,
  10. String? accountId,
  11. double? amount,
  12. String? isoCurrencyCode,
  13. String? unofficialCurrencyCode,
  14. DateTime? date,
  15. bool? pending,
  16. String? transactionId,
  17. String? merchantName,
  18. String? checkNumber,
})

Implementation

TransactionBase copyWith(
    {enums.TransactionBaseTransactionType? transactionType,
    String? pendingTransactionId,
    String? categoryId,
    List<String>? category,
    Location? location,
    PaymentMeta? paymentMeta,
    String? accountOwner,
    String? name,
    String? originalDescription,
    String? accountId,
    double? amount,
    String? isoCurrencyCode,
    String? unofficialCurrencyCode,
    DateTime? date,
    bool? pending,
    String? transactionId,
    String? merchantName,
    String? checkNumber}) {
  return TransactionBase(
      transactionType: transactionType ?? this.transactionType,
      pendingTransactionId: pendingTransactionId ?? this.pendingTransactionId,
      categoryId: categoryId ?? this.categoryId,
      category: category ?? this.category,
      location: location ?? this.location,
      paymentMeta: paymentMeta ?? this.paymentMeta,
      accountOwner: accountOwner ?? this.accountOwner,
      name: name ?? this.name,
      originalDescription: originalDescription ?? this.originalDescription,
      accountId: accountId ?? this.accountId,
      amount: amount ?? this.amount,
      isoCurrencyCode: isoCurrencyCode ?? this.isoCurrencyCode,
      unofficialCurrencyCode:
          unofficialCurrencyCode ?? this.unofficialCurrencyCode,
      date: date ?? this.date,
      pending: pending ?? this.pending,
      transactionId: transactionId ?? this.transactionId,
      merchantName: merchantName ?? this.merchantName,
      checkNumber: checkNumber ?? this.checkNumber);
}