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 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 ChatNotificationSettings notificationSettings, required int messageTtl, 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
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
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
lastMessage Message?
lastMessage Last message in the chat; may be null
final
lastReadInboxMessageId int
lastReadInboxMessageId Identifier of the last read incoming message
final
lastReadOutboxMessageId int
lastReadOutboxMessageId Identifier of the last read outgoing message
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
messageTtl int
messageTtl Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
final
notificationSettings ChatNotificationSettings
notificationSettings Notification settings for this chat
final
pendingJoinRequests ChatJoinRequestsInfo?
pendingJoinRequests Information about pending join requests; may be null
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
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? isMarkedAsUnread, bool? isBlocked, bool? hasScheduledMessages, bool? canBeDeletedOnlyForSelf, bool? canBeDeletedForAllUsers, bool? canBeReported, bool? defaultDisableNotification, int? unreadCount, int? lastReadInboxMessageId, int? lastReadOutboxMessageId, int? unreadMentionCount, ChatNotificationSettings? notificationSettings, int? messageTtl, 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