ReceiverMessage class

Represents an incoming message from another participant.

This class implements the concrete behavior for messages received from other users in the chat. It maintains immutability while supporting state updates through the copyWith method.

Inheritance

Constructors

ReceiverMessage({required String timestamp, required String name, required List<MessageElement> elements, bool isLoading = false, required String id, double? width})

Properties

elements List<MessageElement>
List of content elements that make up the message.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for this message.
finalinherited
isFailed bool
Whether the message failed to send or process.
finalinherited
isLoading bool
Whether the message is currently in a loading state.
finalinherited
isSender bool
Whether this message is from the sender.
no setterinherited
name String
Display name of the message author.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp String
ISO 8601 timestamp when the message was created.
finalinherited
width double?
Optional width constraint for the message bubble.
finalinherited

Methods

copyWith({bool? isLoading, List<MessageElement>? elements, bool? isFailed, String? timestamp, double? width}) ReceiverMessage
Creates a copy of this message with updated properties.
override
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