SenderMessage class
A message sent by the current user.
Send it with ChatController.dispatchMessage to get loading, failure and retry handling.
Constructors
-
SenderMessage({required String timestamp, required String name, required List<
MessageElement> elements, bool isLoading = false, bool isFailed = false, bool? isRead, String? id, String? serverUuid, double? width}) - Creates a SenderMessage.
Properties
-
elements
→ List<
MessageElement> -
Content of the message, rendered in order inside one bubble.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of the message.
finalinherited
- isFailed → bool
-
Whether sending the message failed.
finalinherited
- isLoading → bool
-
Whether the message is still being sent.
finalinherited
- isRead → bool?
-
Read state of the message.
finalinherited
- isSender → bool
-
Whether this is a SenderMessage (sent by the current user).
no setterinherited
- name → String
-
Display name of the author.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverUuid → String?
-
Optional identifier assigned by your server.
finalinherited
- timestamp → String
-
Time the message was sent, as a string parsable by DateTime.parse
(e.g. ISO 8601).
finalinherited
- width → double?
-
Maximum width of this message's bubble.
finalinherited
Methods
-
copyWith(
{String? id, bool? isLoading, List< MessageElement> ? elements, bool? isFailed, bool? isRead, String? timestamp, double? width}) → SenderMessage -
Returns a copy of this message with the given fields replaced.
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