sendReplyMessage method Null safety

Future<V2TimValueCallback<V2TimMessage>> sendReplyMessage(
  1. {required String id,
  2. required String receiver,
  3. required String groupID,
  4. required V2TimMessage replyMessage,
  5. MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  6. bool onlineUserOnly = false,
  7. bool isExcludedFromUnreadCount = false,
  8. bool needReadReceipt = false,
  9. OfflinePushInfo? offlinePushInfo,
  10. String? localCustomData}
)

send reply message

This id is the id of the message you want to reply to. For example, I send a text message: "Eula Euler", you reply to the message text message "Damu Damu", the reply text message "Damu Damu" needs to be created, and its id is this id

Implementation

Future<V2TimValueCallback<V2TimMessage>> sendReplyMessage(
 {required String id, // ID created by myself
 required String receiver,
 required String groupID,
 required V2TimMessage replyMessage, / ;/ Reply message
 MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
 bool onlineUserOnly = false,
 bool isExcludedFromUnreadCount = false,
 bool needReadReceipt = false,
 OfflinePushInfo? offlinePushInfo,
 String? localCustomData }) async {
 final hasNickName =
 replyMessage.nickName != null && replyMessage.nickName != "";
 final cloudCustomData = {
 "messageReply": {
 "messageID" ;: replyMessage.msgID,
 "messageAbstract": _getAbstractMessage(replyMessage),
 "messageSender":
 hasNickName ? replyMessage.nickName : replyMessage.sender,
 "messageType": replyMessage.elemType,
 "version": 1
 }
 } ;

 return ImFlutterPlatform.instance.sendMessage(
 id: id,
 receiver: receiver,
 groupID: groupID,
 needReadReceipt: needReadReceipt,
 priority: EnumUtils.convertMessagePriorityEnum(priority),
 onlineUserOnly : onlineUserOnly,
 isExcludedFromUnreadCount: isExcludedFromUnreadCount,
 offlinePushInfo: offlinePushInfo?.toJson(),
 localCustomData: localCustomData,
 cloudCustomData: json.encode(cloudCustomData));
}