BaseMessage class
Represents a basic chat message.
This class serves as a base class for more specific types of messages, such as text messages, media messages, action messages, etc.
Each BaseMessage
includes a variety of properties, including sender
information, receiver information, timestamps, and more. Among the
properties are some specifically designed for more advanced message
types, such as unreadRepliesCount
for counting unread reply messages,
and reactions
for storing reactions added to the message.
- Inheritance
- Implementers
Constructors
-
BaseMessage({int id = 0, String muid = '', User? sender, AppEntity? receiver, required String receiverUid, required String type, required String receiverType, String category = '', DateTime? sentAt, DateTime? deliveredAt, required DateTime? readAt, Map<
String, dynamic> ? metadata, DateTime? readByMeAt, DateTime? deliveredToMeAt, DateTime? deletedAt, DateTime? editedAt, String? deletedBy, String? editedBy, DateTime? updatedAt, String? conversationId, int parentMessageId = 0, int replyCount = 0, int unreadRepliesCount = 0, List<User> mentionedUsers = const [], List<ReactionCount> reactions = const [], bool? hasMentionedMe}) -
Constructs a new
BaseMessage
instance. - BaseMessage.fromMap(dynamic map)
-
Creates a new
BaseMessage
instance from a map.factory
Properties
- category ↔ String
-
getter/setter pair
- conversationId ↔ String?
-
getter/setter pair
- deletedAt ↔ DateTime?
-
getter/setter pair
- deletedBy ↔ String?
-
getter/setter pair
- deliveredAt ↔ DateTime?
-
getter/setter pair
- deliveredToMeAt ↔ DateTime?
-
getter/setter pair
- editedAt ↔ DateTime?
-
getter/setter pair
- editedBy ↔ String?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasMentionedMe ↔ bool?
-
getter/setter pair
- id ↔ int
-
getter/setter pair
-
mentionedUsers
↔ List<
User> -
getter/setter pair
-
metadata
↔ Map<
String, dynamic> ? -
getter/setter pair
- muid ↔ String
-
getter/setter pair
- parentMessageId ↔ int
-
getter/setter pair
-
reactions
↔ List<
ReactionCount> -
getter/setter pair
- readAt ↔ DateTime?
-
getter/setter pair
- readByMeAt ↔ DateTime?
-
getter/setter pair
- receiver ↔ AppEntity?
-
getter/setter pair
- receiverType ↔ String
-
getter/setter pair
- receiverUid ↔ String
-
getter/setter pair
- replyCount ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender ↔ User?
-
getter/setter pair
- sentAt ↔ DateTime?
-
getter/setter pair
- type ↔ String
-
getter/setter pair
- unreadRepliesCount ↔ int
-
getter/setter pair
- updatedAt ↔ DateTime?
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Generates a map representing the
BaseMessage
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited