copyWith method

User copyWith({
  1. int? id,
  2. String? firstName,
  3. String? lastName,
  4. Usernames? usernames,
  5. String? phoneNumber,
  6. UserStatus? status,
  7. ProfilePhoto? profilePhoto,
  8. int? accentColorId,
  9. int? backgroundCustomEmojiId,
  10. UpgradedGiftColors? upgradedGiftColors,
  11. int? profileAccentColorId,
  12. int? profileBackgroundCustomEmojiId,
  13. EmojiStatus? emojiStatus,
  14. bool? isContact,
  15. bool? isMutualContact,
  16. bool? isCloseFriend,
  17. VerificationStatus? verificationStatus,
  18. bool? isPremium,
  19. bool? isSupport,
  20. RestrictionInfo? restrictionInfo,
  21. ActiveStoryState? activeStoryState,
  22. bool? restrictsNewChats,
  23. int? paidMessageStarCount,
  24. bool? haveAccess,
  25. UserType? type,
  26. String? languageCode,
  27. 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,
    );