copyWithWrapped method

HomeUserDTO copyWithWrapped({
  1. Wrapped<String?>? userId,
  2. Wrapped<String?>? firstName,
  3. Wrapped<String?>? lastName,
  4. Wrapped<String?>? email,
  5. Wrapped<bool?>? isLoggedInUser,
  6. Wrapped<bool?>? isPendingUser,
  7. Wrapped<DateTime?>? invitationDate,
})

Implementation

HomeUserDTO copyWithWrapped(
    {Wrapped<String?>? userId,
    Wrapped<String?>? firstName,
    Wrapped<String?>? lastName,
    Wrapped<String?>? email,
    Wrapped<bool?>? isLoggedInUser,
    Wrapped<bool?>? isPendingUser,
    Wrapped<DateTime?>? invitationDate}) {
  return HomeUserDTO(
      userId: (userId != null ? userId.value : this.userId),
      firstName: (firstName != null ? firstName.value : this.firstName),
      lastName: (lastName != null ? lastName.value : this.lastName),
      email: (email != null ? email.value : this.email),
      isLoggedInUser: (isLoggedInUser != null
          ? isLoggedInUser.value
          : this.isLoggedInUser),
      isPendingUser:
          (isPendingUser != null ? isPendingUser.value : this.isPendingUser),
      invitationDate: (invitationDate != null
          ? invitationDate.value
          : this.invitationDate));
}