Message constructor

Message({
  1. List<Attachment> attachments = const [],
  2. bool? beforeMessageSendFailed,
  3. required String cid,
  4. String? command,
  5. required DateTime createdAt,
  6. Map<String, Object> custom = const {},
  7. DateTime? deletedAt,
  8. required int deletedReplyCount,
  9. required String html,
  10. Map<String, String> i18n = const {},
  11. required String id,
  12. Map<String, List<String>> imageLabels = const {},
  13. List<Reaction> latestReactions = const [],
  14. List<UserObject> mentionedUsers = const [],
  15. DateTime? messageTextUpdatedAt,
  16. String? mml,
  17. List<Reaction> ownReactions = const [],
  18. String? parentId,
  19. DateTime? pinExpires,
  20. required bool pinned,
  21. DateTime? pinnedAt,
  22. UserObject? pinnedBy,
  23. Poll? poll,
  24. String? pollId,
  25. Message? quotedMessage,
  26. String? quotedMessageId,
  27. Map<String, int> reactionCounts = const {},
  28. Map<String, ReactionGroupResponse> reactionGroups = const {},
  29. Map<String, int> reactionScores = const {},
  30. required int replyCount,
  31. required bool shadowed,
  32. bool? showInChannel,
  33. required bool silent,
  34. required String text,
  35. List<UserObject> threadParticipants = const [],
  36. required MessageTypeEnum type,
  37. required DateTime updatedAt,
  38. UserObject? user,
})

Returns a new Message instance.

Implementation

Message({
  this.attachments = const [],
  this.beforeMessageSendFailed,
  required this.cid,
  this.command,
  required this.createdAt,
  this.custom = const {},
  this.deletedAt,
  required this.deletedReplyCount,
  required this.html,
  this.i18n = const {},
  required this.id,
  this.imageLabels = const {},
  this.latestReactions = const [],
  this.mentionedUsers = const [],
  this.messageTextUpdatedAt,
  this.mml,
  this.ownReactions = const [],
  this.parentId,
  this.pinExpires,
  required this.pinned,
  this.pinnedAt,
  this.pinnedBy,
  this.poll,
  this.pollId,
  this.quotedMessage,
  this.quotedMessageId,
  this.reactionCounts = const {},
  this.reactionGroups = const {},
  this.reactionScores = const {},
  required this.replyCount,
  required this.shadowed,
  this.showInChannel,
  required this.silent,
  required this.text,
  this.threadParticipants = const [],
  required this.type,
  required this.updatedAt,
  this.user,
});