RSIMMessage.text constructor

RSIMMessage.text({
  1. required int conversationType,
  2. required String targetId,
  3. String channelId = '',
  4. required String text,
})

Implementation

factory RSIMMessage.text({
  required int conversationType,
  required String targetId,
  String channelId = '',
  required String text,
}) {
  return RSIMMessage(
    conversationType: conversationType,
    targetId: targetId,
    channelId: channelId,
    messageId: 0,
    direction: RSIMMessageDirection.send,
    senderId: '',
    sentStatus: RSIMSentStatus.sending,
    receivedTime: 0,
    sentTime: 0,
    objectName: textObjectName,
    content: jsonEncode(<String, String>{'content': text}),
    uid: '',
    extra: '',
    isOffline: false,
    expiry: 0,
    canIncludeExpansion: false,
    expansion: const <String, String>{},
  );
}