ChatEntity class

Describes a single chat conversation: who is in it, where it is stored in Firestore, and how it should behave.

Constructors

ChatEntity({required PeerUser mainUser, required Map<String, PeerUser> peers, required String path, required String? title, required dynamic onMessageSent(String message, ChatEntity chatEntity), bool supportMedia = false})
Creates a ChatEntity describing a chat conversation.

Properties

hashCode int
The hash code for this object.
no setterinherited
mainUser PeerUser
The user viewing the chat on this device.
final
onMessageSent → dynamic Function(String message, ChatEntity chatEntity)
Called with the sent message text and this ChatEntity whenever a message is successfully sent, e.g. to trigger a push notification.
final
path String
The Firestore collection path where messages for this chat are stored.
final
peers Map<String, PeerUser>
The other participants in the chat, keyed by user id.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportMedia bool
Whether the chat UI shows controls for sending image attachments.
getter/setter pair
title String?
The title displayed on the chat page's app bar.
final

Methods

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

Operators

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