copyWith method
User
copyWith({
- int? id,
- String? firstName,
- String? lastName,
- Usernames? usernames,
- String? phoneNumber,
- UserStatus? status,
- ProfilePhoto? profilePhoto,
- int? accentColorId,
- int? backgroundCustomEmojiId,
- UpgradedGiftColors? upgradedGiftColors,
- int? profileAccentColorId,
- int? profileBackgroundCustomEmojiId,
- EmojiStatus? emojiStatus,
- bool? isContact,
- bool? isMutualContact,
- bool? isCloseFriend,
- VerificationStatus? verificationStatus,
- bool? isPremium,
- bool? isSupport,
- RestrictionInfo? restrictionInfo,
- ActiveStoryState? activeStoryState,
- bool? restrictsNewChats,
- int? paidMessageStarCount,
- bool? haveAccess,
- UserType? type,
- String? languageCode,
- bool? addedToAttachmentMenu,
Implementation
User copyWith({
int? id,
String? firstName,
String? lastName,
Usernames? usernames,
String? phoneNumber,
UserStatus? status,
ProfilePhoto? profilePhoto,
int? accentColorId,
int? backgroundCustomEmojiId,
UpgradedGiftColors? upgradedGiftColors,
int? profileAccentColorId,
int? profileBackgroundCustomEmojiId,
EmojiStatus? emojiStatus,
bool? isContact,
bool? isMutualContact,
bool? isCloseFriend,
VerificationStatus? verificationStatus,
bool? isPremium,
bool? isSupport,
RestrictionInfo? restrictionInfo,
ActiveStoryState? activeStoryState,
bool? restrictsNewChats,
int? paidMessageStarCount,
bool? haveAccess,
UserType? type,
String? languageCode,
bool? addedToAttachmentMenu,
}) => 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,
accentColorId: accentColorId ?? this.accentColorId,
backgroundCustomEmojiId:
backgroundCustomEmojiId ?? this.backgroundCustomEmojiId,
upgradedGiftColors: upgradedGiftColors ?? this.upgradedGiftColors,
profileAccentColorId: profileAccentColorId ?? this.profileAccentColorId,
profileBackgroundCustomEmojiId:
profileBackgroundCustomEmojiId ?? this.profileBackgroundCustomEmojiId,
emojiStatus: emojiStatus ?? this.emojiStatus,
isContact: isContact ?? this.isContact,
isMutualContact: isMutualContact ?? this.isMutualContact,
isCloseFriend: isCloseFriend ?? this.isCloseFriend,
verificationStatus: verificationStatus ?? this.verificationStatus,
isPremium: isPremium ?? this.isPremium,
isSupport: isSupport ?? this.isSupport,
restrictionInfo: restrictionInfo ?? this.restrictionInfo,
activeStoryState: activeStoryState ?? this.activeStoryState,
restrictsNewChats: restrictsNewChats ?? this.restrictsNewChats,
paidMessageStarCount: paidMessageStarCount ?? this.paidMessageStarCount,
haveAccess: haveAccess ?? this.haveAccess,
type: type ?? this.type,
languageCode: languageCode ?? this.languageCode,
addedToAttachmentMenu: addedToAttachmentMenu ?? this.addedToAttachmentMenu,
);