logo
On this page

The ZIMMessageSentCallback in ZIM Flutter sendMessage interface does not expose errorcode. How to get it?

2024-07-03
Products / Plugins:In-app chat
Platform / Framework:Flutter

You can get the errorcode by catching the PlatformException exception. For details, please refer to the following code snippet.

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

Previous

How to add whiteboard tools?

Next

On Web platform, RoomKit large class, how to handle the issue where students cannot see the teacher's video when joining?