copyWith method

User copyWith({
  1. int? id,
  2. String? firstName,
  3. String? lastName,
  4. String? username,
  5. String? phoneNumber,
  6. UserStatus? status,
  7. ProfilePhoto? profilePhoto,
  8. bool? isContact,
  9. bool? isMutualContact,
  10. bool? isVerified,
  11. bool? isSupport,
  12. String? restrictionReason,
  13. bool? isScam,
  14. bool? isFake,
  15. bool? haveAccess,
  16. UserType? type,
  17. String? languageCode,
  18. dynamic extra,
  19. int? clientId,
})

Implementation

User copyWith({
  int? id,
  String? firstName,
  String? lastName,
  String? username,
  String? phoneNumber,
  UserStatus? status,
  ProfilePhoto? profilePhoto,
  bool? isContact,
  bool? isMutualContact,
  bool? isVerified,
  bool? isSupport,
  String? restrictionReason,
  bool? isScam,
  bool? isFake,
  bool? haveAccess,
  UserType? type,
  String? languageCode,
  dynamic extra,
  int? clientId,
}) => User(
  id: id ?? this.id,
  firstName: firstName ?? this.firstName,
  lastName: lastName ?? this.lastName,
  username: username ?? this.username,
  phoneNumber: phoneNumber ?? this.phoneNumber,
  status: status ?? this.status,
  profilePhoto: profilePhoto ?? this.profilePhoto,
  isContact: isContact ?? this.isContact,
  isMutualContact: isMutualContact ?? this.isMutualContact,
  isVerified: isVerified ?? this.isVerified,
  isSupport: isSupport ?? this.isSupport,
  restrictionReason: restrictionReason ?? this.restrictionReason,
  isScam: isScam ?? this.isScam,
  isFake: isFake ?? this.isFake,
  haveAccess: haveAccess ?? this.haveAccess,
  type: type ?? this.type,
  languageCode: languageCode ?? this.languageCode,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);