ChatOperation class

Represents a single operation performed on the message list managed by a ChatController.

Instances of this class are emitted by the ChatController.operationsStream to notify listeners about changes.

Constructors

ChatOperation.insert(Message message, int index)
Creates an insert operation.
factory
ChatOperation.insertAll(List<Message> messages, int index)
Creates an insertAll operation, for inserting multiple messages at a specified index.
factory
ChatOperation.remove(Message message, int index)
Creates a remove operation.
factory
ChatOperation.set(List<Message> messages)
Creates a set operation (signifying a full list replacement).
factory
ChatOperation.update(Message oldMessage, Message message, int index)
Creates an update operation.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
index int?
The index where the message was inserted or removed. Null for update and set. For insertAll, this is the starting index of the insertion.
final
message Message?
The affected message (inserted, updated, removed). Null for set or insertAll.
final
messages List<Message>?
A list of messages, used by insertAll and set operations. Null for other operation types.
final
oldMessage Message?
The message before an update operation. Null for other types.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ChatOperationType
The type of operation performed.
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