onRoomStateChanged property

(void Function(ZIM zim, ZIMRoomState state, ZIMRoomEvent event, Map extendedData, String roomID)?) onRoomStateChanged
getter/setter pair

event callback when the room connection status changes.

Available since: 1.1.0 or above.

Description:event callback when the room connection status changes.

When to call::After creating a ZIM instance through ZIM.create, you can call this interface.

Related APIs:through onTokenWillExpire, the callback will be received when the token is about to expire.

zim ZIM instance. state The current room connection state after changed. event The event that caused the room connection state to change. extendedData Extra information when the event occurs, a standard JSON string.

Implementation

static void Function(ZIM zim, ZIMRoomState state, ZIMRoomEvent event,
    Map extendedData, String roomID)? onRoomStateChanged;