Chat class

This object represents a chat.

Constructors

Chat({required int id, required String type, String? title, String? username, String? firstName, String? lastName, ChatPhoto? photo, String? bio, bool? hasPrivateForwards, bool? hasRestrictedVoiceAndVideoMessages, bool? joinToSendMessages, bool? joinByRequest, String? description, String? inviteLink, Message? pinnedMessage, ChatPermissions? permissions, int? slowModeDelay, int? messageAutoDeleteTime, bool? hasProtectedContent, String? stickerSetName, bool? canSetStickerSet, int? linkedChatId, ChatLocation? location})
Basic constructor

Properties

bio String?
Optional. Bio of the other party in a private chat. Returned only in getChat.
getter/setter pair
canSetStickerSet bool?
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
getter/setter pair
description String?
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
getter/setter pair
firstName String?
Optional. First name of the other party in a private chat
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasPrivateForwards bool?
Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
getter/setter pair
hasProtectedContent bool?
Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
getter/setter pair
hasRestrictedVoiceAndVideoMessages bool?
Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
getter/setter pair
id int
Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
getter/setter pair
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
getter/setter pair
joinByRequest bool?
Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
getter/setter pair
joinToSendMessages bool?
Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
getter/setter pair
lastName String?
Optional. Last name of the other party in a private chat
getter/setter pair
linkedChatId int?
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
getter/setter pair
location ChatLocation?
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
getter/setter pair
messageAutoDeleteTime int?
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
getter/setter pair
permissions ChatPermissions?
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
getter/setter pair
photo ChatPhoto?
Optional. Chat photo. Returned only in getChat.
getter/setter pair
pinnedMessage Message?
Optional. The most recent pinned message (by sending date). Returned only in getChat.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slowModeDelay int?
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
getter/setter pair
stickerSetName String?
Optional. For supergroups, name of group sticker set. Returned only in getChat.
getter/setter pair
title String?
Optional. Title, for supergroups, channels and group chats
getter/setter pair
type String
Type of chat, can be either “private”, “group”, “supergroup” or “channel”
getter/setter pair
username String?
Optional. Username, for private chats, supergroups and channels if available
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map
Creates a json from the object
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) Chat
Creates a object from a json