createImageMessage method

Future<V2TimValueCallback<V2TimMsgCreateInfoResult>> createImageMessage({
  1. required String imagePath,
  2. Uint8List? fileContent,
  3. String? fileName,
})

创建图片消息(图片文件最大支持 28 MB)

  • imagePath 图片路径(只有发送方可以获取到)
  • fileContent 字节数组(只有web端时用到且必填)
  • fileName 图片名(只有web端用到且必填)

Implementation

Future<V2TimValueCallback<V2TimMsgCreateInfoResult>> createImageMessage(
    {required String imagePath,
    Uint8List? fileContent, // web 必填
    String? fileName //web必填写
    }) async {
  return ImFlutterPlatform.instance.createImageMessage(
      imagePath: imagePath, fileContent: fileContent, fileName: fileName);
}