Chat class final
A chat. (Can be a private chat, basic group, supergroup, or secret chat)
- Inheritance
- Available extensions
- Annotations
-
- @immutable
Constructors
-
Chat({required int id, ChatType? type, required String title, ChatPhotoInfo? photo, required int accentColorId, required int backgroundCustomEmojiId, UpgradedGiftColors? upgradedGiftColors, required int profileAccentColorId, required int profileBackgroundCustomEmojiId, 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 int unreadPollVoteCount, ChatNotificationSettings? notificationSettings, ChatAvailableReactions? availableReactions, required int messageAutoDeleteTime, EmojiStatus? emojiStatus, ChatBackground? background, ChatTheme? theme, ChatActionBar? actionBar, BusinessBotManageBar? businessBotManageBar, VideoChat? videoChat, ChatJoinRequestsInfo? pendingJoinRequests, required int replyMarkupMessageId, DraftMessage? draftMessage, required String clientData})
Properties
- accentColorId → int
-
accentColorId Identifier of the accent color for message sender name,
and backgrounds of chat photo, reply header, and link preview
final
- 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
- backgroundCustomEmojiId → int
-
backgroundCustomEmojiId 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?
-
blockList Block list to which the chat is added; may be null if none
final
- businessBotManageBar → BusinessBotManageBar?
-
businessBotManageBar Information about bar for managing a business bot
in 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
-
chatLists
→ List<
ChatList> -
chatLists Chat lists to which the chat belongs. A chat can have a
non-zero position in a chat list even if it doesn't belong to the chat
list and have no position in a chat list even if it belongs to the chat
list
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
- 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
- emojiStatus → EmojiStatus?
-
emojiStatus Emoji status to be shown along with chat title; may be null
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- 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
- 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
- profileAccentColorId → int
-
profileAccentColorId Identifier of the profile accent color for the
chat's profile; -1 if none
final
- profileBackgroundCustomEmojiId → int
-
profileBackgroundCustomEmojiId Identifier of a custom emoji to be shown
on the background of the chat's profile; 0 if none
final
- replyMarkupMessageId → int
-
replyMarkupMessageId Identifier of the message from which reply markup
needs to be used; 0 if there is no reply markup in the chat
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → ChatTheme?
-
theme Theme set for the chat; may be null if none
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
- unreadPollVoteCount → int
-
unreadPollVoteCount Number of messages with unread poll votes in the
chat
final
- unreadReactionCount → int
-
unreadReactionCount Number of messages with unread reactions in the chat
final
- upgradedGiftColors → UpgradedGiftColors?
-
upgradedGiftColors Color scheme based on an upgraded gift to be used for
the chat instead of accent_color_id and background_custom_emoji_id; may be
null if none
final
- videoChat → VideoChat?
-
videoChat Information about video chat of the chat
final
- viewAsTopics → bool
-
viewAsTopics 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, UpgradedGiftColors? upgradedGiftColors, 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, int? unreadPollVoteCount, ChatNotificationSettings? notificationSettings, ChatAvailableReactions? availableReactions, int? messageAutoDeleteTime, EmojiStatus? emojiStatus, ChatBackground? background, ChatTheme? theme, ChatActionBar? actionBar, BusinessBotManageBar? businessBotManageBar, VideoChat? videoChat, ChatJoinRequestsInfo? pendingJoinRequests, int? replyMarkupMessageId, DraftMessage? draftMessage, String? clientData}) → Chat -
Available on Chat, provided by the ChatExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- constructor → const String