createImageMessage method

  1. @override
Future<V2TimMsgCreateInfoResult?> createImageMessage({
  1. String? imageName,
  2. String? imagePath,
  3. dynamic inputElement,
})
override

Implementation

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