copyWith method

UserData copyWith({
  1. String? userId,
  2. String? cpCode,
  3. String? firstName,
  4. String? lastName,
  5. String? companyName,
  6. String? contactNo,
  7. String? emailAddress,
  8. String? profileImage,
  9. String? birthdate,
  10. String? birthdateTime,
  11. String? address,
  12. String? registerText,
  13. String? reraNo,
  14. String? gender,
  15. String? residentialStatus,
  16. String? maritalStatus,
})

Implementation

UserData copyWith({  String? userId,
  String? cpCode,
  String? firstName,
  String? lastName,
  String? companyName,
  String? contactNo,
  String? emailAddress,
  String? profileImage,
  String? birthdate,
  String? birthdateTime,
  String? address,
  String? registerText,
  String? reraNo,

  String? gender,
  String? residentialStatus,
  String? maritalStatus,

}) => UserData(  userId: userId ?? _userId,
  cpCode: cpCode ?? _cpCode,
  firstName: firstName ?? _firstName,
  lastName: lastName ?? _lastName,
  companyName: companyName ?? _companyName,
  contactNo: contactNo ?? _contactNo,
  emailAddress: emailAddress ?? _emailAddress,
  profileImage: profileImage ?? _profileImage,
  birthdate: birthdate ?? _birthdate,
  birthdateTime: birthdateTime ?? _birthdateTime,
  address: address ?? _address,
  registerText: registerText ?? _registerText,
  reraNo: reraNo ?? _reraNo,

  gender: gender ?? _gender,
  residentialStatus: residentialStatus ?? _residentialStatus,
  maritalStatus: maritalStatus ?? _maritalStatus,

);