SenderMessage class

Represents an outgoing message from the current user.

This class handles messages sent by the current user, including automatic UUID generation for unique identification. It supports failure states for retry functionality.

Inheritance

Constructors

SenderMessage({required String timestamp, required String name, required List<MessageElement> elements, bool isLoading = false, bool isFailed = false, 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}) SenderMessage
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