sendTextMessage method
void
sendTextMessage(
- String text, {
- NIMMessage? replyMsg,
- List<String>? pushList,
})
Implementation
void sendTextMessage(String text,
{NIMMessage? replyMsg, List<String>? pushList}) {
MessageBuilder.createTextMessage(
sessionId: sessionId,
sessionType: sessionType,
text: text,
).then((value) {
if (value.isSuccess && value.data != null) {
if (sessionType == NIMSessionType.team &&
pushList != null &&
pushList.isNotEmpty) {
value.data!.memberPushOption = NIMMemberPushOption(
forcePushContent: value.data!.content,
forcePushList:
pushList.length == 1 && pushList[0] == 'ACCOUNT_ALL'
? null
: pushList);
}
sendMessage(value.data!, replyMsg: replyMsg);
}
});
}