copyWith method

UserFullInfo copyWith({
  1. ChatPhoto? personalPhoto()?,
  2. ChatPhoto? photo()?,
  3. ChatPhoto? publicPhoto()?,
  4. int? communityId,
  5. BlockList? blockList()?,
  6. bool? canBeCalled,
  7. bool? supportsVideoCalls,
  8. bool? hasPrivateCalls,
  9. bool? hasPrivateForwards,
  10. bool? hasRestrictedVoiceAndVideoNoteMessages,
  11. bool? hasPostedToProfileStories,
  12. bool? hasSponsoredMessagesEnabled,
  13. bool? needPhoneNumberPrivacyException,
  14. bool? setChatBackground,
  15. bool? usesUnofficialApp,
  16. FormattedText? bio()?,
  17. Birthdate? birthdate()?,
  18. int? personalChatId,
  19. int? giftCount,
  20. int? groupInCommonCount,
  21. int? incomingPaidMessageStarCount,
  22. int? outgoingPaidMessageStarCount,
  23. GiftSettings? giftSettings,
  24. BotVerification? botVerification()?,
  25. ProfileTab? mainProfileTab()?,
  26. Audio? firstProfileAudio()?,
  27. UserRating? rating()?,
  28. UserRating? pendingRating()?,
  29. int? pendingRatingDate,
  30. FormattedText? note()?,
  31. TonWalletCard? tonWalletCard()?,
  32. ProfileShareTheme? shareTheme()?,
  33. BusinessInfo? businessInfo()?,
  34. BotInfo? botInfo()?,
  35. dynamic extra,
  36. int? clientId,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

UserFullInfo copyWith({
  ChatPhoto? Function()? personalPhoto,
  ChatPhoto? Function()? photo,
  ChatPhoto? Function()? publicPhoto,
  int? communityId,
  BlockList? Function()? blockList,
  bool? canBeCalled,
  bool? supportsVideoCalls,
  bool? hasPrivateCalls,
  bool? hasPrivateForwards,
  bool? hasRestrictedVoiceAndVideoNoteMessages,
  bool? hasPostedToProfileStories,
  bool? hasSponsoredMessagesEnabled,
  bool? needPhoneNumberPrivacyException,
  bool? setChatBackground,
  bool? usesUnofficialApp,
  FormattedText? Function()? bio,
  Birthdate? Function()? birthdate,
  int? personalChatId,
  int? giftCount,
  int? groupInCommonCount,
  int? incomingPaidMessageStarCount,
  int? outgoingPaidMessageStarCount,
  GiftSettings? giftSettings,
  BotVerification? Function()? botVerification,
  ProfileTab? Function()? mainProfileTab,
  Audio? Function()? firstProfileAudio,
  UserRating? Function()? rating,
  UserRating? Function()? pendingRating,
  int? pendingRatingDate,
  FormattedText? Function()? note,
  TonWalletCard? Function()? tonWalletCard,
  ProfileShareTheme? Function()? shareTheme,
  BusinessInfo? Function()? businessInfo,
  BotInfo? Function()? botInfo,
  dynamic extra,
  int? clientId,
}) => UserFullInfo(
  personalPhoto: personalPhoto != null ? personalPhoto() : this.personalPhoto,
  photo: photo != null ? photo() : this.photo,
  publicPhoto: publicPhoto != null ? publicPhoto() : this.publicPhoto,
  communityId: communityId ?? this.communityId,
  blockList: blockList != null ? blockList() : this.blockList,
  canBeCalled: canBeCalled ?? this.canBeCalled,
  supportsVideoCalls: supportsVideoCalls ?? this.supportsVideoCalls,
  hasPrivateCalls: hasPrivateCalls ?? this.hasPrivateCalls,
  hasPrivateForwards: hasPrivateForwards ?? this.hasPrivateForwards,
  hasRestrictedVoiceAndVideoNoteMessages:
      hasRestrictedVoiceAndVideoNoteMessages ??
      this.hasRestrictedVoiceAndVideoNoteMessages,
  hasPostedToProfileStories:
      hasPostedToProfileStories ?? this.hasPostedToProfileStories,
  hasSponsoredMessagesEnabled:
      hasSponsoredMessagesEnabled ?? this.hasSponsoredMessagesEnabled,
  needPhoneNumberPrivacyException:
      needPhoneNumberPrivacyException ?? this.needPhoneNumberPrivacyException,
  setChatBackground: setChatBackground ?? this.setChatBackground,
  usesUnofficialApp: usesUnofficialApp ?? this.usesUnofficialApp,
  bio: bio != null ? bio() : this.bio,
  birthdate: birthdate != null ? birthdate() : this.birthdate,
  personalChatId: personalChatId ?? this.personalChatId,
  giftCount: giftCount ?? this.giftCount,
  groupInCommonCount: groupInCommonCount ?? this.groupInCommonCount,
  incomingPaidMessageStarCount:
      incomingPaidMessageStarCount ?? this.incomingPaidMessageStarCount,
  outgoingPaidMessageStarCount:
      outgoingPaidMessageStarCount ?? this.outgoingPaidMessageStarCount,
  giftSettings: giftSettings ?? this.giftSettings,
  botVerification: botVerification != null
      ? botVerification()
      : this.botVerification,
  mainProfileTab: mainProfileTab != null
      ? mainProfileTab()
      : this.mainProfileTab,
  firstProfileAudio: firstProfileAudio != null
      ? firstProfileAudio()
      : this.firstProfileAudio,
  rating: rating != null ? rating() : this.rating,
  pendingRating: pendingRating != null ? pendingRating() : this.pendingRating,
  pendingRatingDate: pendingRatingDate ?? this.pendingRatingDate,
  note: note != null ? note() : this.note,
  tonWalletCard: tonWalletCard != null ? tonWalletCard() : this.tonWalletCard,
  shareTheme: shareTheme != null ? shareTheme() : this.shareTheme,
  businessInfo: businessInfo != null ? businessInfo() : this.businessInfo,
  botInfo: botInfo != null ? botInfo() : this.botInfo,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);