logo
常见问题
当前页

ZIM Flutter sendMessage 接口的 ZIMMessageSentCallback 中没有暴露 errorcode,该如何获取呢?

2024-07-03

您可以通过捕获 PlatformException 异常的方式来获取 errorcode,详情可参考以下代码片段。

try { 
    var ret = await ZIM.getInstance()!.sendMessage(
        message, 
        obj.toUserID, 
        ZIMConversationType.peer, 
        config, 
        messageSendNotification); 
    } 
on PlatformException catch (onError) {
     onError.code; onError.message; 
}

Previous

如何添加白板工具?

Next

Web 平台上,RoomKit 大班课,作为学生加入时看不到教师的画面如何处理?