copyWith method

PinChatMessage copyWith({
  1. int? chatId,
  2. int? messageId,
  3. bool? disableNotification,
  4. bool? onlyForSelf,
})

Copy model with modified properties.

Properties:

  • chat_id: Identifier of the chat
  • message_id: Identifier of the new pinned message
  • disable_notification: Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats
  • only_for_self: Pass true to pin the message only for self; private chats only

Implementation

PinChatMessage copyWith({
  int? chatId,
  int? messageId,
  bool? disableNotification,
  bool? onlyForSelf,
}) =>
    PinChatMessage(
      chatId: chatId ?? this.chatId,
      messageId: messageId ?? this.messageId,
      disableNotification: disableNotification ?? this.disableNotification,
      onlyForSelf: onlyForSelf ?? this.onlyForSelf,
    );