copyWith method

UserFullInfo copyWith({
  1. ChatPhoto? personalPhoto()?,
  2. ChatPhoto? photo()?,
  3. ChatPhoto? publicPhoto()?,
  4. BlockList? blockList()?,
  5. bool? canBeCalled,
  6. bool? supportsVideoCalls,
  7. bool? hasPrivateCalls,
  8. bool? hasPrivateForwards,
  9. bool? hasRestrictedVoiceAndVideoNoteMessages,
  10. bool? hasPinnedStories,
  11. bool? needPhoneNumberPrivacyException,
  12. bool? setChatBackground,
  13. FormattedText? bio()?,
  14. List<PremiumPaymentOption>? premiumGiftOptions,
  15. int? groupInCommonCount,
  16. BusinessInfo? businessInfo()?,
  17. BotInfo? botInfo()?,
  18. dynamic extra,
  19. 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,
  BlockList? Function()? blockList,
  bool? canBeCalled,
  bool? supportsVideoCalls,
  bool? hasPrivateCalls,
  bool? hasPrivateForwards,
  bool? hasRestrictedVoiceAndVideoNoteMessages,
  bool? hasPinnedStories,
  bool? needPhoneNumberPrivacyException,
  bool? setChatBackground,
  FormattedText? Function()? bio,
  List<PremiumPaymentOption>? premiumGiftOptions,
  int? groupInCommonCount,
  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,
      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,
      hasPinnedStories: hasPinnedStories ?? this.hasPinnedStories,
      needPhoneNumberPrivacyException: needPhoneNumberPrivacyException ??
          this.needPhoneNumberPrivacyException,
      setChatBackground: setChatBackground ?? this.setChatBackground,
      bio: bio != null ? bio() : this.bio,
      premiumGiftOptions: premiumGiftOptions ?? this.premiumGiftOptions,
      groupInCommonCount: groupInCommonCount ?? this.groupInCommonCount,
      businessInfo: businessInfo != null ? businessInfo() : this.businessInfo,
      botInfo: botInfo != null ? botInfo() : this.botInfo,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );