copyWith method

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

Implementation

Transaction copyWith(
    {enums.TransactionTransactionType? transactionType,
    String? transactionId,
    String? accountOwner,
    String? pendingTransactionId,
    bool? pending,
    enums.TransactionPaymentChannel? paymentChannel,
    PaymentMeta? paymentMeta,
    String? name,
    String? merchantName,
    Location? location,
    String? authorizedDate,
    String? authorizedDatetime,
    String? date,
    String? datetime,
    String? categoryId,
    List<String>? category,
    String? unofficialCurrencyCode,
    String? isoCurrencyCode,
    double? amount,
    String? accountId,
    enums.TransactionCode? transactionCode,
    String? originalDescription}) {
  return Transaction(
      transactionType: transactionType ?? this.transactionType,
      transactionId: transactionId ?? this.transactionId,
      accountOwner: accountOwner ?? this.accountOwner,
      pendingTransactionId: pendingTransactionId ?? this.pendingTransactionId,
      pending: pending ?? this.pending,
      paymentChannel: paymentChannel ?? this.paymentChannel,
      paymentMeta: paymentMeta ?? this.paymentMeta,
      name: name ?? this.name,
      merchantName: merchantName ?? this.merchantName,
      location: location ?? this.location,
      authorizedDate: authorizedDate ?? this.authorizedDate,
      authorizedDatetime: authorizedDatetime ?? this.authorizedDatetime,
      date: date ?? this.date,
      datetime: datetime ?? this.datetime,
      categoryId: categoryId ?? this.categoryId,
      category: category ?? this.category,
      unofficialCurrencyCode:
          unofficialCurrencyCode ?? this.unofficialCurrencyCode,
      isoCurrencyCode: isoCurrencyCode ?? this.isoCurrencyCode,
      amount: amount ?? this.amount,
      accountId: accountId ?? this.accountId,
      transactionCode: transactionCode ?? this.transactionCode,
      originalDescription: originalDescription ?? this.originalDescription);
}