BaseMessage constructor

BaseMessage({
  1. int id = 0,
  2. String muid = '',
  3. User? sender,
  4. AppEntity? receiver,
  5. required String receiverUid,
  6. required String type,
  7. required String receiverType,
  8. String category = '',
  9. DateTime? sentAt,
  10. DateTime? deliveredAt,
  11. required DateTime? readAt,
  12. Map<String, dynamic>? metadata,
  13. DateTime? readByMeAt,
  14. DateTime? deliveredToMeAt,
  15. DateTime? deletedAt,
  16. DateTime? editedAt,
  17. String? deletedBy,
  18. String? editedBy,
  19. DateTime? updatedAt,
  20. String? conversationId,
  21. int parentMessageId = 0,
  22. int replyCount = 0,
  23. int unreadRepliesCount = 0,
  24. List<User> mentionedUsers = const [],
  25. List<ReactionCount> reactions = const [],
  26. bool? hasMentionedMe,
})

Constructs a new BaseMessage instance.

Most properties are optional and have default values. Some, such as receiverUid, type, and receiverType are required.

Implementation

BaseMessage(
    {this.id = 0,
    this.muid = '',
    this.sender,
    this.receiver,
    required this.receiverUid,
    required this.type,
    required this.receiverType,
    this.category = '',
    this.sentAt,
    this.deliveredAt,
    required this.readAt,
    this.metadata,
    this.readByMeAt,
    this.deliveredToMeAt,
    this.deletedAt,
    this.editedAt,
    this.deletedBy,
    this.editedBy,
    this.updatedAt,
    this.conversationId,
    this.parentMessageId = 0,
    this.replyCount = 0,
    this.unreadRepliesCount = 0,
    this.mentionedUsers = const [],
    this.reactions = const [],
    this.hasMentionedMe});