switchRoom method

Future<Map> switchRoom(
  1. String fromRoomID,
  2. dynamic toRoomInfo,
  3. bool isCreateWhenRoomNotExisted,
  4. dynamic config,
)

Implementation

Future<Map<dynamic, dynamic>> switchRoom(
    String fromRoomID,
    dynamic toRoomInfo,
    bool isCreateWhenRoomNotExisted,
    dynamic config) async {
  final result = await promiseToFuture(ZIM.getInstance()!.switchRoom(
          fromRoomID,
          _mapToJSObject(toRoomInfo),
          isCreateWhenRoomNotExisted,
          _mapToJSObject(config)))
      .catchError(_handleError);
  return _jsObjectToMap(result);
}