copyWith method

AttachmentMenuBot copyWith({
  1. int? botUserId,
  2. bool? supportsSelfChat,
  3. bool? supportsUserChats,
  4. bool? supportsBotChats,
  5. bool? supportsGroupChats,
  6. bool? supportsChannelChats,
  7. bool? requestWriteAccess,
  8. bool? isAdded,
  9. bool? showInAttachmentMenu,
  10. bool? showInSideMenu,
  11. bool? showDisclaimerInSideMenu,
  12. String? name,
  13. AttachmentMenuBotColor? nameColor()?,
  14. File? defaultIcon()?,
  15. File? iosStaticIcon()?,
  16. File? iosAnimatedIcon()?,
  17. File? iosSideMenuIcon()?,
  18. File? androidIcon()?,
  19. File? androidSideMenuIcon()?,
  20. File? macosIcon()?,
  21. File? macosSideMenuIcon()?,
  22. AttachmentMenuBotColor? iconColor()?,
  23. File? webAppPlaceholder()?,
  24. dynamic extra,
  25. 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

AttachmentMenuBot copyWith({
  int? botUserId,
  bool? supportsSelfChat,
  bool? supportsUserChats,
  bool? supportsBotChats,
  bool? supportsGroupChats,
  bool? supportsChannelChats,
  bool? requestWriteAccess,
  bool? isAdded,
  bool? showInAttachmentMenu,
  bool? showInSideMenu,
  bool? showDisclaimerInSideMenu,
  String? name,
  AttachmentMenuBotColor? Function()? nameColor,
  File? Function()? defaultIcon,
  File? Function()? iosStaticIcon,
  File? Function()? iosAnimatedIcon,
  File? Function()? iosSideMenuIcon,
  File? Function()? androidIcon,
  File? Function()? androidSideMenuIcon,
  File? Function()? macosIcon,
  File? Function()? macosSideMenuIcon,
  AttachmentMenuBotColor? Function()? iconColor,
  File? Function()? webAppPlaceholder,
  dynamic extra,
  int? clientId,
}) => AttachmentMenuBot(
  botUserId: botUserId ?? this.botUserId,
  supportsSelfChat: supportsSelfChat ?? this.supportsSelfChat,
  supportsUserChats: supportsUserChats ?? this.supportsUserChats,
  supportsBotChats: supportsBotChats ?? this.supportsBotChats,
  supportsGroupChats: supportsGroupChats ?? this.supportsGroupChats,
  supportsChannelChats: supportsChannelChats ?? this.supportsChannelChats,
  requestWriteAccess: requestWriteAccess ?? this.requestWriteAccess,
  isAdded: isAdded ?? this.isAdded,
  showInAttachmentMenu: showInAttachmentMenu ?? this.showInAttachmentMenu,
  showInSideMenu: showInSideMenu ?? this.showInSideMenu,
  showDisclaimerInSideMenu:
      showDisclaimerInSideMenu ?? this.showDisclaimerInSideMenu,
  name: name ?? this.name,
  nameColor: nameColor != null ? nameColor() : this.nameColor,
  defaultIcon: defaultIcon != null ? defaultIcon() : this.defaultIcon,
  iosStaticIcon: iosStaticIcon != null ? iosStaticIcon() : this.iosStaticIcon,
  iosAnimatedIcon: iosAnimatedIcon != null
      ? iosAnimatedIcon()
      : this.iosAnimatedIcon,
  iosSideMenuIcon: iosSideMenuIcon != null
      ? iosSideMenuIcon()
      : this.iosSideMenuIcon,
  androidIcon: androidIcon != null ? androidIcon() : this.androidIcon,
  androidSideMenuIcon: androidSideMenuIcon != null
      ? androidSideMenuIcon()
      : this.androidSideMenuIcon,
  macosIcon: macosIcon != null ? macosIcon() : this.macosIcon,
  macosSideMenuIcon: macosSideMenuIcon != null
      ? macosSideMenuIcon()
      : this.macosSideMenuIcon,
  iconColor: iconColor != null ? iconColor() : this.iconColor,
  webAppPlaceholder: webAppPlaceholder != null
      ? webAppPlaceholder()
      : this.webAppPlaceholder,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);