ChatModel class
A chat message as stored in and read from a ChatBackend.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
The backend document/row id of the message.
getter/setter pair
- image ↔ String?
-
The URL of an attached image, if any.
getter/setter pair
- message ↔ String?
-
The text content of the message.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- senderId ↔ int?
-
The id of the user who sent the message.
getter/setter pair
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
Static Methods
-
jsonFrom(
ChatMessage m, Object timestamp) → Map< String, dynamic> -
Converts a
ChatMessagefromdash_chat_custominto the JSON map used to persist a chat message document/row.timestampis supplied by the backend so it can use its own server-time convention (e.g.FieldValue.serverTimestamp()for Firestore, or an ISO-8601 string for Appwrite/Supabase).