MessageParams.text constructor

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

Constructs a MessageParams object for a Text message.

Implementation

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