EMConversation class Null safety

The conversation class, indicating a one-to-one chat, a group chat, or a converation chat. It contains the messages that are sent and received within the converation.

The following code shows how to get the number of the unread messages from the conversation.

  // ConversationId can be the other party id, the group id, or the chat room id.
  EMConversation? con = await EMClient.getInstance.chatManager.getConversation(conversationId);
  int? unreadCount = con?.unreadCount;
Available Extensions

Properties

hashCode int
The hash code for this object.
read-only, inherited
id String
The conversation ID.
final
isChatThread bool
Is chat thread conversation.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type EMConversationType
The conversation type.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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