copyWith method
Copy model with modified properties.
Properties:
chat_id: Identifier of the chatmessage_id: Identifier of the new pinned messagedisable_notification: Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chatsonly_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,
);