Chat class

This object represents a chat.

Implemented types
Implementers
Available extensions

Constructors

Chat({required int id, required ChatType type, String? title, String? username, String? firstName, String? lastName, bool? isForum})
Constructs a Chat object.
const
Chat.fromJson(Map<String, dynamic> json)
Creates a Chat object from JSON.
factory

Properties

firstName String?
First name of the other party in a private chat.
final
hashCode int
The hash code for this object.
no setterinherited
id int
Unique identifier for this chat.
final
isForum bool?
True, if the supergroup chat is a forum (has topics enabled).
final
lastName String?
Last name of the other party in a private chat.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
Title, for supergroups, channels, and group chats.
final
type ChatType
Type of the chat, can be either "private", "group", "supergroup" or "channel".
final
username String?
Username, for private chats, supergroups, and channels if available.
final

Methods

getChannelId() ID?

Available on Chat, provided by the GetChatID extension

Gets the chat's ChannelID from the username
getId() ChatID

Available on Chat, provided by the GetChatID extension

Returns the ChatID of the chat.
isTheSameChat(ID chatId) bool

Available on Chat, provided by the GetChatID extension

Returns true if the chatId passed matches the current chat's ID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a Chat object to JSON.
toString() String
A string representation of this object.
inherited

Operators

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