copyWith method

TransactionDetail copyWith({
  1. String? accountName,
  2. String? payeeName,
  3. String? categoryName,
  4. List<SubTransaction>? subtransactions,
  5. String? id,
  6. DateTime? date,
  7. num? amount,
  8. String? memo,
  9. TransactionDetailCleared? cleared,
  10. bool? approved,
  11. TransactionDetailFlagColor? flagColor,
  12. String? accountId,
  13. String? payeeId,
  14. String? categoryId,
  15. String? transferAccountId,
  16. String? transferTransactionId,
  17. String? matchedTransactionId,
  18. String? importId,
  19. String? importPayeeName,
  20. String? importPayeeNameOriginal,
  21. bool? deleted,
})

Implementation

TransactionDetail copyWith(
    {String? accountName,
    String? payeeName,
    String? categoryName,
    List<SubTransaction>? subtransactions,
    String? id,
    DateTime? date,
    num? amount,
    String? memo,
    enums.TransactionDetailCleared? cleared,
    bool? approved,
    enums.TransactionDetailFlagColor? flagColor,
    String? accountId,
    String? payeeId,
    String? categoryId,
    String? transferAccountId,
    String? transferTransactionId,
    String? matchedTransactionId,
    String? importId,
    String? importPayeeName,
    String? importPayeeNameOriginal,
    bool? deleted}) {
  return TransactionDetail(
      accountName: accountName ?? this.accountName,
      payeeName: payeeName ?? this.payeeName,
      categoryName: categoryName ?? this.categoryName,
      subtransactions: subtransactions ?? this.subtransactions,
      id: id ?? this.id,
      date: date ?? this.date,
      amount: amount ?? this.amount,
      memo: memo ?? this.memo,
      cleared: cleared ?? this.cleared,
      approved: approved ?? this.approved,
      flagColor: flagColor ?? this.flagColor,
      accountId: accountId ?? this.accountId,
      payeeId: payeeId ?? this.payeeId,
      categoryId: categoryId ?? this.categoryId,
      transferAccountId: transferAccountId ?? this.transferAccountId,
      transferTransactionId:
          transferTransactionId ?? this.transferTransactionId,
      matchedTransactionId: matchedTransactionId ?? this.matchedTransactionId,
      importId: importId ?? this.importId,
      importPayeeName: importPayeeName ?? this.importPayeeName,
      importPayeeNameOriginal:
          importPayeeNameOriginal ?? this.importPayeeNameOriginal,
      deleted: deleted ?? this.deleted);
}