downloadMessage method

  1. @override
Future<V2TimCallback> downloadMessage({
  1. required String msgID,
  2. required int messageType,
  3. required int imageType,
  4. required bool isSnapshot,
})
override

Implementation

@override
Future<V2TimCallback> downloadMessage(
    {required String msgID,
    required int messageType,
    required int imageType,
    required bool isSnapshot}) async {
  final result = await TencentImSDKPlugin.v2TIMManager
      .getMessageManager()
      .downloadMessage(
          msgID: msgID,
          messageType: messageType,
          imageType: imageType,
          isSnapshot: isSnapshot);
  if (result.code != 0) {
    _coreService.callOnCallback(TIMCallback(
        type: TIMCallbackType.API_ERROR,
        errorMsg: result.desc,
        errorCode: result.code));
  }
  return result;
}