Chat class

Implemented types

Constructors

Chat({int id, dynamic type, String title, ChatPhoto photo, ChatPermissions permissions, Message lastMessage, int order, bool isPinned, bool isMarkedAsUnread, bool isSponsored, bool canBeDeletedOnlyForSelf, bool canBeDeletedForAllUsers, bool canBeReported, bool defaultDisableNotification, int unreadCount, int lastReadInboxMessageId, int lastReadOutboxMessageId, int unreadMentionCount, ChatNotificationSettings notificationSettings, int pinnedMessageId, int replyMarkupMessageId, DraftMessage draftMessage, String clientData})
A chat. (Can be a private chat, basic group, supergroup, or secret chat). id Chat unique identifier. type Type of the chat. title Chat title. photo Chat photo; may be null. permissions Actions that non-administrator chat members are allowed to take in the chat. lastMessage Last message in the chat; may be null. order Descending parameter by which chats are sorted in the main chat list. If the order number of two chats is the same, they must be sorted in descending order by ID. If 0, the position of the chat in the list is undetermined. isPinned True, if the chat is pinned. isMarkedAsUnread True, if the chat is marked as unread. isSponsored True, if the chat is sponsored by the user's MTProxy server. canBeDeletedOnlyForSelf True, if the chat messages can be deleted only for the current user while other users will continue to see the messages. canBeDeletedForAllUsers True, if the chat messages can be deleted for all users. canBeReported True, if the chat can be reported to Telegram moderators through reportChat. defaultDisableNotification Default value of the disable_notification parameter, used when a message is sent to the chat. unreadCount Number of unread messages in the chat. lastReadInboxMessageId Identifier of the last read incoming message. lastReadOutboxMessageId Identifier of the last read outgoing message. unreadMentionCount Number of unread messages with a mention. notificationSettings Notification settings for this chat. pinnedMessageId Identifier of the pinned message in the chat; 0 if none. replyMarkupMessageId Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat. draftMessage A draft of a message in the chat; may be null. clientData Contains client-specific data associated with the chat. (For example, the chat position or local chat notification settings can be stored here.) Persistent if a message database is used
Chat.fromJson(Map<String, dynamic> json)
Parse from a json

Properties

canBeDeletedForAllUsers bool
read / write
canBeDeletedOnlyForSelf bool
read / write
canBeReported bool
read / write
clientData String
read / write
defaultDisableNotification bool
read / write
draftMessage DraftMessage
read / write
extra ↔ dynamic
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
id int
read / write
isMarkedAsUnread bool
read / write
isPinned bool
read / write
isSponsored bool
read / write
lastMessage Message
read / write
lastReadInboxMessageId int
read / write
lastReadOutboxMessageId int
read / write
notificationSettings ChatNotificationSettings
read / write
order int
read / write
permissions ChatPermissions
read / write
photo ChatPhoto
read / write
pinnedMessageId int
read / write
replyMarkupMessageId int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
title String
read / write
type ↔ dynamic
read / write
unreadCount int
read / write
unreadMentionCount int
read / write

Methods

getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
override
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

CONSTRUCTOR → const String
"chat"