copyWith method

Transaction copyWith({
  1. TransactionPaymentChannel? paymentChannel,
  2. DateTime? authorizedDate,
  3. DateTime? authorizedDatetime,
  4. DateTime? datetime,
  5. TransactionCode? transactionCode,
  6. PersonalFinanceCategory? personalFinanceCategory,
  7. TransactionTransactionType? transactionType,
  8. String? pendingTransactionId,
  9. String? categoryId,
  10. List<String>? category,
  11. Location? location,
  12. PaymentMeta? paymentMeta,
  13. String? accountOwner,
  14. String? name,
  15. String? originalDescription,
  16. String? accountId,
  17. double? amount,
  18. String? isoCurrencyCode,
  19. String? unofficialCurrencyCode,
  20. DateTime? date,
  21. bool? pending,
  22. String? transactionId,
  23. String? merchantName,
  24. String? checkNumber,
})

Implementation

Transaction copyWith(
    {enums.TransactionPaymentChannel? paymentChannel,
    DateTime? authorizedDate,
    DateTime? authorizedDatetime,
    DateTime? datetime,
    enums.TransactionCode? transactionCode,
    PersonalFinanceCategory? personalFinanceCategory,
    enums.TransactionTransactionType? 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 Transaction(
      paymentChannel: paymentChannel ?? this.paymentChannel,
      authorizedDate: authorizedDate ?? this.authorizedDate,
      authorizedDatetime: authorizedDatetime ?? this.authorizedDatetime,
      datetime: datetime ?? this.datetime,
      transactionCode: transactionCode ?? this.transactionCode,
      personalFinanceCategory:
          personalFinanceCategory ?? this.personalFinanceCategory,
      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);
}