copyWith method

StudentLoan copyWith({
  1. String? accountId,
  2. String? accountNumber,
  3. List<DateTime>? disbursementDates,
  4. DateTime? expectedPayoffDate,
  5. String? guarantor,
  6. double? interestRatePercentage,
  7. bool? isOverdue,
  8. double? lastPaymentAmount,
  9. DateTime? lastPaymentDate,
  10. DateTime? lastStatementIssueDate,
  11. String? loanName,
  12. StudentLoanStatus? loanStatus,
  13. double? minimumPaymentAmount,
  14. DateTime? nextPaymentDueDate,
  15. DateTime? originationDate,
  16. double? originationPrincipalAmount,
  17. double? outstandingInterestAmount,
  18. String? paymentReferenceNumber,
  19. PSLFStatus? pslfStatus,
  20. StudentRepaymentPlan? repaymentPlan,
  21. String? sequenceNumber,
  22. ServicerAddressData? servicerAddress,
  23. double? ytdInterestPaid,
  24. double? ytdPrincipalPaid,
})

Implementation

StudentLoan copyWith(
    {String? accountId,
    String? accountNumber,
    List<DateTime>? disbursementDates,
    DateTime? expectedPayoffDate,
    String? guarantor,
    double? interestRatePercentage,
    bool? isOverdue,
    double? lastPaymentAmount,
    DateTime? lastPaymentDate,
    DateTime? lastStatementIssueDate,
    String? loanName,
    StudentLoanStatus? loanStatus,
    double? minimumPaymentAmount,
    DateTime? nextPaymentDueDate,
    DateTime? originationDate,
    double? originationPrincipalAmount,
    double? outstandingInterestAmount,
    String? paymentReferenceNumber,
    PSLFStatus? pslfStatus,
    StudentRepaymentPlan? repaymentPlan,
    String? sequenceNumber,
    ServicerAddressData? servicerAddress,
    double? ytdInterestPaid,
    double? ytdPrincipalPaid}) {
  return StudentLoan(
      accountId: accountId ?? this.accountId,
      accountNumber: accountNumber ?? this.accountNumber,
      disbursementDates: disbursementDates ?? this.disbursementDates,
      expectedPayoffDate: expectedPayoffDate ?? this.expectedPayoffDate,
      guarantor: guarantor ?? this.guarantor,
      interestRatePercentage:
          interestRatePercentage ?? this.interestRatePercentage,
      isOverdue: isOverdue ?? this.isOverdue,
      lastPaymentAmount: lastPaymentAmount ?? this.lastPaymentAmount,
      lastPaymentDate: lastPaymentDate ?? this.lastPaymentDate,
      lastStatementIssueDate:
          lastStatementIssueDate ?? this.lastStatementIssueDate,
      loanName: loanName ?? this.loanName,
      loanStatus: loanStatus ?? this.loanStatus,
      minimumPaymentAmount: minimumPaymentAmount ?? this.minimumPaymentAmount,
      nextPaymentDueDate: nextPaymentDueDate ?? this.nextPaymentDueDate,
      originationDate: originationDate ?? this.originationDate,
      originationPrincipalAmount:
          originationPrincipalAmount ?? this.originationPrincipalAmount,
      outstandingInterestAmount:
          outstandingInterestAmount ?? this.outstandingInterestAmount,
      paymentReferenceNumber:
          paymentReferenceNumber ?? this.paymentReferenceNumber,
      pslfStatus: pslfStatus ?? this.pslfStatus,
      repaymentPlan: repaymentPlan ?? this.repaymentPlan,
      sequenceNumber: sequenceNumber ?? this.sequenceNumber,
      servicerAddress: servicerAddress ?? this.servicerAddress,
      ytdInterestPaid: ytdInterestPaid ?? this.ytdInterestPaid,
      ytdPrincipalPaid: ytdPrincipalPaid ?? this.ytdPrincipalPaid);
}