copyWith method
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,
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,
);