copyWith method

Chat copyWith({
  1. int? id,
  2. ChatType? type,
  3. String? title,
  4. ChatPhotoInfo? photo,
  5. ChatPermissions? permissions,
  6. Message? lastMessage,
  7. List<ChatPosition>? positions,
  8. MessageSender? messageSenderId,
  9. bool? hasProtectedContent,
  10. bool? isTranslatable,
  11. bool? isMarkedAsUnread,
  12. bool? isBlocked,
  13. bool? hasScheduledMessages,
  14. bool? canBeDeletedOnlyForSelf,
  15. bool? canBeDeletedForAllUsers,
  16. bool? canBeReported,
  17. bool? defaultDisableNotification,
  18. int? unreadCount,
  19. int? lastReadInboxMessageId,
  20. int? lastReadOutboxMessageId,
  21. int? unreadMentionCount,
  22. int? unreadReactionCount,
  23. ChatNotificationSettings? notificationSettings,
  24. ChatAvailableReactions? availableReactions,
  25. int? messageAutoDeleteTime,
  26. ChatBackground? background,
  27. String? themeName,
  28. ChatActionBar? actionBar,
  29. VideoChat? videoChat,
  30. ChatJoinRequestsInfo? pendingJoinRequests,
  31. int? replyMarkupMessageId,
  32. DraftMessage? draftMessage,
  33. String? clientData,
  34. dynamic extra,
  35. int? clientId,
})

Implementation

Chat copyWith({
  int? id,
  ChatType? type,
  String? title,
  ChatPhotoInfo? photo,
  ChatPermissions? permissions,
  Message? lastMessage,
  List<ChatPosition>? positions,
  MessageSender? messageSenderId,
  bool? hasProtectedContent,
  bool? isTranslatable,
  bool? isMarkedAsUnread,
  bool? isBlocked,
  bool? hasScheduledMessages,
  bool? canBeDeletedOnlyForSelf,
  bool? canBeDeletedForAllUsers,
  bool? canBeReported,
  bool? defaultDisableNotification,
  int? unreadCount,
  int? lastReadInboxMessageId,
  int? lastReadOutboxMessageId,
  int? unreadMentionCount,
  int? unreadReactionCount,
  ChatNotificationSettings? notificationSettings,
  ChatAvailableReactions? availableReactions,
  int? messageAutoDeleteTime,
  ChatBackground? background,
  String? themeName,
  ChatActionBar? actionBar,
  VideoChat? videoChat,
  ChatJoinRequestsInfo? pendingJoinRequests,
  int? replyMarkupMessageId,
  DraftMessage? draftMessage,
  String? clientData,
  dynamic extra,
  int? clientId,
}) =>
    Chat(
      id: id ?? this.id,
      type: type ?? this.type,
      title: title ?? this.title,
      photo: photo ?? this.photo,
      permissions: permissions ?? this.permissions,
      lastMessage: lastMessage ?? this.lastMessage,
      positions: positions ?? this.positions,
      messageSenderId: messageSenderId ?? this.messageSenderId,
      hasProtectedContent: hasProtectedContent ?? this.hasProtectedContent,
      isTranslatable: isTranslatable ?? this.isTranslatable,
      isMarkedAsUnread: isMarkedAsUnread ?? this.isMarkedAsUnread,
      isBlocked: isBlocked ?? this.isBlocked,
      hasScheduledMessages: hasScheduledMessages ?? this.hasScheduledMessages,
      canBeDeletedOnlyForSelf:
          canBeDeletedOnlyForSelf ?? this.canBeDeletedOnlyForSelf,
      canBeDeletedForAllUsers:
          canBeDeletedForAllUsers ?? this.canBeDeletedForAllUsers,
      canBeReported: canBeReported ?? this.canBeReported,
      defaultDisableNotification:
          defaultDisableNotification ?? this.defaultDisableNotification,
      unreadCount: unreadCount ?? this.unreadCount,
      lastReadInboxMessageId:
          lastReadInboxMessageId ?? this.lastReadInboxMessageId,
      lastReadOutboxMessageId:
          lastReadOutboxMessageId ?? this.lastReadOutboxMessageId,
      unreadMentionCount: unreadMentionCount ?? this.unreadMentionCount,
      unreadReactionCount: unreadReactionCount ?? this.unreadReactionCount,
      notificationSettings: notificationSettings ?? this.notificationSettings,
      availableReactions: availableReactions ?? this.availableReactions,
      messageAutoDeleteTime:
          messageAutoDeleteTime ?? this.messageAutoDeleteTime,
      background: background ?? this.background,
      themeName: themeName ?? this.themeName,
      actionBar: actionBar ?? this.actionBar,
      videoChat: videoChat ?? this.videoChat,
      pendingJoinRequests: pendingJoinRequests ?? this.pendingJoinRequests,
      replyMarkupMessageId: replyMarkupMessageId ?? this.replyMarkupMessageId,
      draftMessage: draftMessage ?? this.draftMessage,
      clientData: clientData ?? this.clientData,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );