ChatDispatch class

The ChatDispatch receives chat related messages from the server and passes them on to the correct ChatController.

Constructors

ChatDispatch({required Caller caller})
Creates a new ChatDispatch.

Properties

caller → Caller
A reference to the chat module.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(String channel, ChatMessageListener listener, {String? unauthenticatedUserName}) → void
Adds a listener to a specific chat channel. It's only allowed to add one listener per channel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postMessage(ChatMessagePost message) Future<void>
Posts a chat message.
postRequestMessageChunk(ChatRequestMessageChunk chunkRequest) Future<void>
Requests a new chunk of messages.
removeListener(String channel) → void
Removes a listener for the specified channel.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getInstance(Caller caller) ChatDispatch
Returns a singleton instance of the ChatDispatch.