copyWith method

MortgageLiability copyWith({
  1. String? accountId,
  2. String? accountNumber,
  3. double? currentLateFee,
  4. double? escrowBalance,
  5. bool? hasPmi,
  6. bool? hasPrepaymentPenalty,
  7. MortgageInterestRate? interestRate,
  8. double? lastPaymentAmount,
  9. DateTime? lastPaymentDate,
  10. String? loanTypeDescription,
  11. String? loanTerm,
  12. DateTime? maturityDate,
  13. double? nextMonthlyPayment,
  14. DateTime? nextPaymentDueDate,
  15. DateTime? originationDate,
  16. double? originationPrincipalAmount,
  17. double? pastDueAmount,
  18. MortgagePropertyAddress? propertyAddress,
  19. double? ytdInterestPaid,
  20. double? ytdPrincipalPaid,
})

Implementation

MortgageLiability copyWith(
    {String? accountId,
    String? accountNumber,
    double? currentLateFee,
    double? escrowBalance,
    bool? hasPmi,
    bool? hasPrepaymentPenalty,
    MortgageInterestRate? interestRate,
    double? lastPaymentAmount,
    DateTime? lastPaymentDate,
    String? loanTypeDescription,
    String? loanTerm,
    DateTime? maturityDate,
    double? nextMonthlyPayment,
    DateTime? nextPaymentDueDate,
    DateTime? originationDate,
    double? originationPrincipalAmount,
    double? pastDueAmount,
    MortgagePropertyAddress? propertyAddress,
    double? ytdInterestPaid,
    double? ytdPrincipalPaid}) {
  return MortgageLiability(
      accountId: accountId ?? this.accountId,
      accountNumber: accountNumber ?? this.accountNumber,
      currentLateFee: currentLateFee ?? this.currentLateFee,
      escrowBalance: escrowBalance ?? this.escrowBalance,
      hasPmi: hasPmi ?? this.hasPmi,
      hasPrepaymentPenalty: hasPrepaymentPenalty ?? this.hasPrepaymentPenalty,
      interestRate: interestRate ?? this.interestRate,
      lastPaymentAmount: lastPaymentAmount ?? this.lastPaymentAmount,
      lastPaymentDate: lastPaymentDate ?? this.lastPaymentDate,
      loanTypeDescription: loanTypeDescription ?? this.loanTypeDescription,
      loanTerm: loanTerm ?? this.loanTerm,
      maturityDate: maturityDate ?? this.maturityDate,
      nextMonthlyPayment: nextMonthlyPayment ?? this.nextMonthlyPayment,
      nextPaymentDueDate: nextPaymentDueDate ?? this.nextPaymentDueDate,
      originationDate: originationDate ?? this.originationDate,
      originationPrincipalAmount:
          originationPrincipalAmount ?? this.originationPrincipalAmount,
      pastDueAmount: pastDueAmount ?? this.pastDueAmount,
      propertyAddress: propertyAddress ?? this.propertyAddress,
      ytdInterestPaid: ytdInterestPaid ?? this.ytdInterestPaid,
      ytdPrincipalPaid: ytdPrincipalPaid ?? this.ytdPrincipalPaid);
}