Chat class

Inheritance

Constructors

Chat({required int id, required ChatType type, required String title, ChatPhotoInfo? photo, required ChatPermissions permissions, Message? lastMessage, required List<ChatPosition> positions, MessageSender? messageSenderId, required bool hasProtectedContent, required bool isTranslatable, required bool isMarkedAsUnread, required bool isBlocked, required bool hasScheduledMessages, required bool canBeDeletedOnlyForSelf, required bool canBeDeletedForAllUsers, required bool canBeReported, required bool defaultDisableNotification, required int unreadCount, required int lastReadInboxMessageId, required int lastReadOutboxMessageId, required int unreadMentionCount, required int unreadReactionCount, required ChatNotificationSettings notificationSettings, required ChatAvailableReactions availableReactions, required int messageAutoDeleteTime, ChatBackground? background, required String themeName, ChatActionBar? actionBar, required VideoChat videoChat, ChatJoinRequestsInfo? pendingJoinRequests, required int replyMarkupMessageId, DraftMessage? draftMessage, required String clientData, dynamic extra, int? clientId})
A chat. (Can be a private chat, basic group, supergroup, or secret chat)
const
Chat.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

actionBar ChatActionBar?
actionBar Information about actions which must be possible to do through the chat action bar; may be null if none
final
availableReactions ChatAvailableReactions
availableReactions Types of reaction, available in the chat
final
background ChatBackground?
background Background set for the chat; may be null if none
final
canBeDeletedForAllUsers bool
canBeDeletedForAllUsers True, if the chat messages can be deleted for all users
final
canBeDeletedOnlyForSelf bool
canBeDeletedOnlyForSelf True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
final
canBeReported bool
canBeReported True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto
final
clientData String
clientData Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
final
clientId int?
clientId client identifier
final
defaultDisableNotification bool
defaultDisableNotification Default value of the disable_notification parameter, used when a message is sent to the chat
final
draftMessage DraftMessage?
draftMessage A draft of a message in the chat; may be null if none
final
extra → dynamic
extra callback sign
final
hashCode int
The hash code for this object.
no setterinherited
hasProtectedContent bool
hasProtectedContent True, if chat content can't be saved locally, forwarded, or copied
final
hasScheduledMessages bool
hasScheduledMessages True, if the chat has scheduled messages
final
id int
id Chat unique identifier
final
isBlocked bool
isBlocked True, if the chat is blocked by the current user and private messages from the chat can't be received
final
isMarkedAsUnread bool
isMarkedAsUnread True, if the chat is marked as unread
final
isTranslatable bool
isTranslatable True, if translation of all messages in the chat must be suggested to the user
final
lastMessage Message?
lastMessage Last message in the chat; may be null if none or unknown
final
lastReadInboxMessageId int
lastReadInboxMessageId Identifier of the last read incoming message
final
lastReadOutboxMessageId int
lastReadOutboxMessageId Identifier of the last read outgoing message
final
messageAutoDeleteTime int
messageAutoDeleteTime Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date
final
messageSenderId MessageSender?
messageSenderId Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender
final
notificationSettings ChatNotificationSettings
notificationSettings Notification settings for the chat
final
pendingJoinRequests ChatJoinRequestsInfo?
pendingJoinRequests Information about pending join requests; may be null if none
final
permissions ChatPermissions
permissions Actions that non-administrator chat members are allowed to take in the chat
final
photo ChatPhotoInfo?
photo Chat photo; may be null
final
positions List<ChatPosition>
positions Positions of the chat in chat lists
final
replyMarkupMessageId int
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
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
themeName String
themeName If non-empty, name of a theme, set for the chat
final
title String
title Chat title
final
type ChatType
type Type of the chat
final
unreadCount int
unreadCount Number of unread messages in the chat
final
unreadMentionCount int
unreadMentionCount Number of unread messages with a mention/reply in the chat
final
unreadReactionCount int
unreadReactionCount Number of messages with unread reactions in the chat
final
videoChat VideoChat
videoChat Information about video chat of the chat
final

Methods

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
getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson([dynamic extra]) Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

CONSTRUCTOR → const String