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. EmojiStatus? emojiStatus,
  9. bool? isContact,
  10. bool? isMutualContact,
  11. bool? isCloseFriend,
  12. bool? isVerified,
  13. bool? isPremium,
  14. bool? isSupport,
  15. String? restrictionReason,
  16. bool? isScam,
  17. bool? isFake,
  18. bool? hasActiveStories,
  19. bool? hasUnreadActiveStories,
  20. bool? haveAccess,
  21. UserType? type,
  22. String? languageCode,
  23. bool? addedToAttachmentMenu,
  24. dynamic extra,
  25. 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,
    );