ChatMessage class
One message, as the model holds it.
Constructors
-
ChatMessage({required MessageKey key, required String? msgid, required String sender, required MessageKind kind, required String text, required String? account, required bool historical, required bool own, required String? reply_to, required Map<
String, List< reactions, required LinkPreview? link_preview, required bool redacted})String> > -
const
-
ChatMessage.fromJson(Map<
String, dynamic> json) -
factory
Properties
- account → String?
-
The account the sender was logged in as, from
account-tag.final - hashCode → int
-
The hash code for this object.
no setterinherited
- historical → bool
-
True when this arrived inside a history batch rather than live.
final
- key → MessageKey
-
Where it sits in the log.
final
- kind → MessageKind
-
What kind of event it is.
final
- link_preview → LinkPreview?
-
A preview of the first link in this message, when the server built one.
final
- msgid → String?
-
The network-unique id, when the server assigned one.
final
- own → bool
-
True when this is our own message coming back through
echo-message.final -
reactions
→ Map<
String, List< String> > -
Reactions, keyed by the emoji, holding who reacted.
final
- redacted → bool
-
True once the message was redacted. The original is kept, because throwing it away leaves no
way to show who redacted what.
final
- reply_to → String?
-
The message this one replies to, from the
+replytag. The server is inconsistent about the spelling and sends+replyfrom one module and+draft/replyfrom another, so both are accepted on the way in.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender → String
-
Who sent it, as they spell their own nick.
final
- text → String
-
The body, empty for events that have none.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited