copyWith method

SupergroupFullInfo copyWith({
  1. ChatPhoto? photo()?,
  2. String? description,
  3. int? memberCount,
  4. int? administratorCount,
  5. int? restrictedCount,
  6. int? bannedCount,
  7. int? linkedChatId,
  8. int? slowModeDelay,
  9. double? slowModeDelayExpiresIn,
  10. bool? canGetMembers,
  11. bool? hasHiddenMembers,
  12. bool? canHideMembers,
  13. bool? canSetStickerSet,
  14. bool? canSetLocation,
  15. bool? canGetStatistics,
  16. bool? canToggleAggressiveAntiSpam,
  17. bool? isAllHistoryAvailable,
  18. bool? hasAggressiveAntiSpamEnabled,
  19. bool? hasPinnedStories,
  20. int? myBoostCount,
  21. int? unrestrictBoostCount,
  22. int? stickerSetId,
  23. int? customEmojiStickerSetId,
  24. ChatLocation? location()?,
  25. ChatInviteLink? inviteLink()?,
  26. List<BotCommands>? botCommands,
  27. int? upgradedFromBasicGroupId,
  28. int? upgradedFromMaxMessageId,
  29. dynamic extra,
  30. 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

SupergroupFullInfo copyWith({
  ChatPhoto? Function()? photo,
  String? description,
  int? memberCount,
  int? administratorCount,
  int? restrictedCount,
  int? bannedCount,
  int? linkedChatId,
  int? slowModeDelay,
  double? slowModeDelayExpiresIn,
  bool? canGetMembers,
  bool? hasHiddenMembers,
  bool? canHideMembers,
  bool? canSetStickerSet,
  bool? canSetLocation,
  bool? canGetStatistics,
  bool? canToggleAggressiveAntiSpam,
  bool? isAllHistoryAvailable,
  bool? hasAggressiveAntiSpamEnabled,
  bool? hasPinnedStories,
  int? myBoostCount,
  int? unrestrictBoostCount,
  int? stickerSetId,
  int? customEmojiStickerSetId,
  ChatLocation? Function()? location,
  ChatInviteLink? Function()? inviteLink,
  List<BotCommands>? botCommands,
  int? upgradedFromBasicGroupId,
  int? upgradedFromMaxMessageId,
  dynamic extra,
  int? clientId,
}) =>
    SupergroupFullInfo(
      photo: photo != null ? photo() : this.photo,
      description: description ?? this.description,
      memberCount: memberCount ?? this.memberCount,
      administratorCount: administratorCount ?? this.administratorCount,
      restrictedCount: restrictedCount ?? this.restrictedCount,
      bannedCount: bannedCount ?? this.bannedCount,
      linkedChatId: linkedChatId ?? this.linkedChatId,
      slowModeDelay: slowModeDelay ?? this.slowModeDelay,
      slowModeDelayExpiresIn:
          slowModeDelayExpiresIn ?? this.slowModeDelayExpiresIn,
      canGetMembers: canGetMembers ?? this.canGetMembers,
      hasHiddenMembers: hasHiddenMembers ?? this.hasHiddenMembers,
      canHideMembers: canHideMembers ?? this.canHideMembers,
      canSetStickerSet: canSetStickerSet ?? this.canSetStickerSet,
      canSetLocation: canSetLocation ?? this.canSetLocation,
      canGetStatistics: canGetStatistics ?? this.canGetStatistics,
      canToggleAggressiveAntiSpam:
          canToggleAggressiveAntiSpam ?? this.canToggleAggressiveAntiSpam,
      isAllHistoryAvailable:
          isAllHistoryAvailable ?? this.isAllHistoryAvailable,
      hasAggressiveAntiSpamEnabled:
          hasAggressiveAntiSpamEnabled ?? this.hasAggressiveAntiSpamEnabled,
      hasPinnedStories: hasPinnedStories ?? this.hasPinnedStories,
      myBoostCount: myBoostCount ?? this.myBoostCount,
      unrestrictBoostCount: unrestrictBoostCount ?? this.unrestrictBoostCount,
      stickerSetId: stickerSetId ?? this.stickerSetId,
      customEmojiStickerSetId:
          customEmojiStickerSetId ?? this.customEmojiStickerSetId,
      location: location != null ? location() : this.location,
      inviteLink: inviteLink != null ? inviteLink() : this.inviteLink,
      botCommands: botCommands ?? this.botCommands,
      upgradedFromBasicGroupId:
          upgradedFromBasicGroupId ?? this.upgradedFromBasicGroupId,
      upgradedFromMaxMessageId:
          upgradedFromMaxMessageId ?? this.upgradedFromMaxMessageId,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );