copyWith method
User
copyWith({
- int? id,
- String? firstName,
- String? lastName,
- Usernames? usernames,
- String? phoneNumber,
- UserStatus? status,
- ProfilePhoto? profilePhoto,
- EmojiStatus? emojiStatus,
- bool? isContact,
- bool? isMutualContact,
- bool? isCloseFriend,
- bool? isVerified,
- bool? isPremium,
- bool? isSupport,
- String? restrictionReason,
- bool? isScam,
- bool? isFake,
- bool? hasActiveStories,
- bool? hasUnreadActiveStories,
- bool? haveAccess,
- UserType? type,
- String? languageCode,
- bool? addedToAttachmentMenu,
- dynamic extra,
- int? clientId,
Implementation
User copyWith({
int? id,
String? firstName,
String? lastName,
Usernames? usernames,
String? phoneNumber,
UserStatus? status,
ProfilePhoto? profilePhoto,
EmojiStatus? emojiStatus,
bool? isContact,
bool? isMutualContact,
bool? isCloseFriend,
bool? isVerified,
bool? isPremium,
bool? isSupport,
String? restrictionReason,
bool? isScam,
bool? isFake,
bool? hasActiveStories,
bool? hasUnreadActiveStories,
bool? haveAccess,
UserType? type,
String? languageCode,
bool? addedToAttachmentMenu,
dynamic extra,
int? clientId,
}) =>
User(
id: id ?? this.id,
firstName: firstName ?? this.firstName,
lastName: lastName ?? this.lastName,
usernames: usernames ?? this.usernames,
phoneNumber: phoneNumber ?? this.phoneNumber,
status: status ?? this.status,
profilePhoto: profilePhoto ?? this.profilePhoto,
emojiStatus: emojiStatus ?? this.emojiStatus,
isContact: isContact ?? this.isContact,
isMutualContact: isMutualContact ?? this.isMutualContact,
isCloseFriend: isCloseFriend ?? this.isCloseFriend,
isVerified: isVerified ?? this.isVerified,
isPremium: isPremium ?? this.isPremium,
isSupport: isSupport ?? this.isSupport,
restrictionReason: restrictionReason ?? this.restrictionReason,
isScam: isScam ?? this.isScam,
isFake: isFake ?? this.isFake,
hasActiveStories: hasActiveStories ?? this.hasActiveStories,
hasUnreadActiveStories:
hasUnreadActiveStories ?? this.hasUnreadActiveStories,
haveAccess: haveAccess ?? this.haveAccess,
type: type ?? this.type,
languageCode: languageCode ?? this.languageCode,
addedToAttachmentMenu:
addedToAttachmentMenu ?? this.addedToAttachmentMenu,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);