copyWith method

HomeownerDTO copyWith({
  1. int? id,
  2. String? email,
  3. String? firstName,
  4. String? lastName,
  5. bool? hasAcceptedTC,
  6. List<String>? deviceSerialNumbers,
  7. bool? hasApprovedDevices,
  8. bool? hasAppAccount,
  9. bool? hasAcceptedMarketingOutreach,
})

Implementation

HomeownerDTO copyWith(
    {int? id,
    String? email,
    String? firstName,
    String? lastName,
    bool? hasAcceptedTC,
    List<String>? deviceSerialNumbers,
    bool? hasApprovedDevices,
    bool? hasAppAccount,
    bool? hasAcceptedMarketingOutreach}) {
  return HomeownerDTO(
      id: id ?? this.id,
      email: email ?? this.email,
      firstName: firstName ?? this.firstName,
      lastName: lastName ?? this.lastName,
      hasAcceptedTC: hasAcceptedTC ?? this.hasAcceptedTC,
      deviceSerialNumbers: deviceSerialNumbers ?? this.deviceSerialNumbers,
      hasApprovedDevices: hasApprovedDevices ?? this.hasApprovedDevices,
      hasAppAccount: hasAppAccount ?? this.hasAppAccount,
      hasAcceptedMarketingOutreach:
          hasAcceptedMarketingOutreach ?? this.hasAcceptedMarketingOutreach);
}