switchRoom method
Future<Map>
switchRoom(
- String fromRoomID,
- dynamic toRoomInfo,
- bool isCreateWhenRoomNotExisted,
- dynamic config,
)
Implementation
Future<Map<dynamic,dynamic>> switchRoom(String fromRoomID, dynamic toRoomInfo, bool isCreateWhenRoomNotExisted, dynamic config) async {
Object _config = mapToJSObj(config);
final result = await promiseToFuture(ZIM.getInstance()!.switchRoom(fromRoomID, mapToJSObj(toRoomInfo), isCreateWhenRoomNotExisted, _config)).catchError((e){
throw PlatformException(code: e.code.toString(), message: e.message);
});
return jsObjectToMap(result);
}