ChatController class abstract
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messages
→ List<
Message> -
Gets the current list of messages.
no setter
-
operationsStream
→ Stream<
ChatOperation> -
A stream that emits ChatOperation objects whenever the message list changes.
UI components can listen to this stream to react to updates.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Releases resources used by the controller (e.g., closes streams).
-
insertAllMessages(
List< Message> messages, {int? index}) → Future<void> -
Inserts a list of
messages
into the chat, starting at the specifiedindex
. -
insertMessage(
Message message, {int? index}) → Future< void> -
Inserts a new
message
into the list, optionally at a specificindex
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeMessage(
Message message) → Future< void> -
Removes a specific
message
from the list. Themessage
parameter is used to identify the message to be removed, typically by itsid
. -
setMessages(
List< Message> messages) → Future<void> -
Replaces the entire message list with the provided
messages
. -
toString(
) → String -
A string representation of this object.
inherited
-
updateMessage(
Message oldMessage, Message newMessage) → Future< void> -
Replaces an
oldMessage
with anewMessage
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited