SystemMessage class abstract
A class that represents a system message (anything around chat management). Use metadata to store anything you want.
Constructors
-
SystemMessage({User author, int? createdAt, required String id, Map<
String, dynamic> ? metadata, String? remoteId, Message? repliedMessage, String? roomId, bool? showStatus, Status? status, required String text, MessageType? type, int? updatedAt}) -
constfactory
-
SystemMessage.fromJson(Map<
String, dynamic> json) -
Creates a custom message from a map (decoded JSON).
factory
Properties
-
User who sent this message.
finalinherited
- createdAt → int?
-
Created message timestamp, in ms.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique ID of the message.
finalinherited
-
metadata
→ Map<
String, dynamic> ? -
Additional custom metadata or attributes related to the message.
finalinherited
-
props
→ List<
Object?> -
Equatable props.
no setter
- remoteId → String?
-
Unique ID of the message received from the backend.
finalinherited
- repliedMessage → Message?
-
Message that is being replied to with the current message.
finalinherited
- roomId → String?
-
ID of the room where this message is sent.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showStatus → bool?
-
Show status or not.
finalinherited
- status → Status?
-
Message Status.
finalinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - text → String
-
System message content (could be text or translation key).
final
- type → MessageType
-
MessageType.
finalinherited
- updatedAt → int?
-
Updated message timestamp, in ms.
finalinherited
Methods
-
copyWith(
{User? author, int? createdAt, String? id, Map< String, dynamic> ? metadata, String? remoteId, Message? repliedMessage, String? roomId, bool? showStatus, Status? status, String? text, int? updatedAt}) → Message -
Creates a copy of the message with an updated data.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts a custom message to the map representation,
encodable to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited