Chat class final
A chat. (Can be a private chat, basic group, supergroup, or secret chat)
Constructors
-
Chat({required int id, required ChatType type, required String title, ChatPhotoInfo? photo, required int accentColorId, required int backgroundCustomEmojiId, required int profileAccentColorId, required int profileBackgroundCustomEmojiId, required ChatPermissions permissions, Message? lastMessage, required List<
ChatPosition> positions, required List<ChatList> chatLists, MessageSender? messageSenderId, BlockList? blockList, required bool hasProtectedContent, required bool isTranslatable, required bool isMarkedAsUnread, required bool viewAsTopics, 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, EmojiStatus? emojiStatus, 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) -
Parses a Chat from TDLib JSON.
factory
Properties
- accentColorId → int
-
Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview
final
- actionBar → ChatActionBar?
-
Information about actions which must be possible to do through the chat action bar; may be null if none
final
- availableReactions → ChatAvailableReactions
-
Types of reaction, available in the chat
final
- background → ChatBackground?
-
Background set for the chat; may be null if none
final
- backgroundCustomEmojiId → int
-
Identifier of a custom emoji to be shown on the reply header and link preview background for messages sent by the chat; 0 if none
final
- blockList → BlockList?
-
Block list to which the chat is added; may be null if none
final
- canBeDeletedForAllUsers → bool
-
True, if the chat messages can be deleted for all users
final
- canBeDeletedOnlyForSelf → bool
-
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
-
True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto
final
-
chatLists
→ List<
ChatList> -
Chat lists to which the chat belongs. A chat can have a non-zero position in a chat list even it doesn't belong to the chat list and have no position in a chat list even it belongs to the chat list
final
- clientData → String
-
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?
-
Identifier of the TDLib client that sent this object.
final
- defaultDisableNotification → bool
-
Default value of the disable_notification parameter, used when a message is sent to the chat
final
- draftMessage → DraftMessage?
-
A draft of a message in the chat; may be null if none
final
- emojiStatus → EmojiStatus?
-
Emoji status to be shown along with chat title; may be null
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasProtectedContent → bool
-
True, if chat content can't be saved locally, forwarded, or copied
final
- hasScheduledMessages → bool
-
True, if the chat has scheduled messages
final
- id → int
-
Chat unique identifier
final
- isMarkedAsUnread → bool
-
True, if the chat is marked as unread
final
- isTranslatable → bool
-
True, if translation of all messages in the chat must be suggested to the user
final
- lastMessage → Message?
-
Last message in the chat; may be null if none or unknown
final
- lastReadInboxMessageId → int
-
Identifier of the last read incoming message
final
- lastReadOutboxMessageId → int
-
Identifier of the last read outgoing message
final
- messageAutoDeleteTime → int
-
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?
-
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
-
Notification settings for the chat
final
- pendingJoinRequests → ChatJoinRequestsInfo?
-
Information about pending join requests; may be null if none
final
- permissions → ChatPermissions
-
Actions that non-administrator chat members are allowed to take in the chat
final
- photo → ChatPhotoInfo?
-
Chat photo; may be null
final
-
positions
→ List<
ChatPosition> -
Positions of the chat in chat lists
final
- profileAccentColorId → int
-
Identifier of the profile accent color for the chat's profile; -1 if none
final
- profileBackgroundCustomEmojiId → int
-
Identifier of a custom emoji to be shown on the background of the chat's profile; 0 if none
final
- replyMarkupMessageId → int
-
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
-
If non-empty, name of a theme, set for the chat
final
- title → String
-
Chat title
final
- type → ChatType
-
Type of the chat
final
- unreadCount → int
-
Number of unread messages in the chat
final
- unreadMentionCount → int
-
Number of unread messages with a mention/reply in the chat
final
- unreadReactionCount → int
-
Number of messages with unread reactions in the chat
final
- videoChat → VideoChat
-
Information about video chat of the chat
final
- viewAsTopics → bool
-
True, if the chat is a forum supergroup that must be shown in the "View as topics" mode, or Saved Messages chat that must be shown in the "View as chats"
final
Methods
-
copyWith(
{int? id, ChatType? type, String? title, ChatPhotoInfo? photo()?, int? accentColorId, int? backgroundCustomEmojiId, int? profileAccentColorId, int? profileBackgroundCustomEmojiId, ChatPermissions? permissions, Message? lastMessage()?, List< ChatPosition> ? positions, List<ChatList> ? chatLists, MessageSender? messageSenderId()?, BlockList? blockList()?, bool? hasProtectedContent, bool? isTranslatable, bool? isMarkedAsUnread, bool? viewAsTopics, 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, EmojiStatus? emojiStatus()?, ChatBackground? background()?, String? themeName, ChatActionBar? actionBar()?, VideoChat? videoChat, ChatJoinRequestsInfo? pendingJoinRequests()?, int? replyMarkupMessageId, DraftMessage? draftMessage()?, String? clientData, dynamic extra, int? clientId}) → Chat -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.