MessageParams.document constructor

MessageParams.document({
  1. required String toJid,
  2. String? replyMessageId,
  3. required FileMessageParams fileMessageParams,
  4. List<MessageMetaData> metaData = const [],
  5. String topicId = "",
})

Constructs a MessageParams object for a Document message.

Implementation

factory MessageParams.document({
  required String toJid,
  String? replyMessageId,
  required FileMessageParams fileMessageParams,
  List<MessageMetaData> metaData = const [],
  String topicId = "",
}) {
  return MessageParams._(
    toJid: toJid,
    replyMessageId: replyMessageId,
    messageType: MessageType.document,
    fileMessageParams: fileMessageParams,
    metaData: metaData,
    topicId: topicId,
  );
}