createFileMessage method

  1. @override
Future<V2TimMsgCreateInfoResult?> createFileMessage({
  1. String? filePath,
  2. required String fileName,
  3. dynamic inputElement,
})
override

Implementation

@override
Future<V2TimMsgCreateInfoResult?> createFileMessage(
    {String? filePath,
    required String fileName,
    dynamic inputElement}) async {
  final res = await TencentImSDKPlugin.v2TIMManager
      .getMessageManager()
      .createFileMessage(
          filePath: filePath ?? "",
          fileName: fileName,
          inputElement: inputElement);
  if (res.code == 0) {
    return res.data;
  }
  _coreService.callOnCallback(TIMCallback(
      type: TIMCallbackType.API_ERROR,
      errorMsg: res.desc,
      errorCode: res.code));
  return null;
}