onSendMessageProgress method

dynamic onSendMessageProgress({
  1. required V2TimMessage message,
  2. required int progress,
  3. required bool isSendComplete,
  4. String? id,
})

Implementation

onSendMessageProgress({required V2TimMessage message, required int progress, required bool isSendComplete, String? id}) {
  String? createID = TencentCloudChatUtils.checkString(message.id) ?? id;
  if (TencentCloudChatUtils.checkString(createID) != null) {
    if (_messageProgressData[createID] == null || !_messageProgressData[createID]!.isSendComplete) {
      _messageProgressData[createID!] = SendingMessageData(
        createID: createID,
        message: message,
        sdkID: message.msgID ?? "",
        progress: progress,
        isSendComplete: isSendComplete,
      );

      notifyListener(TencentCloudChatMessageDataKeys.sendMessageProgress as T);
    }
  }
}