createRoom method

Future<Map> createRoom(
  1. dynamic roomInfo,
  2. dynamic config
)

Implementation

Future<Map<dynamic, dynamic>> createRoom(
    dynamic roomInfo, dynamic config) async {
  Object _roomInfo = mapToJSObj(roomInfo);
  Object _config = mapToJSObj(config);

  final result =
      await promiseToFuture(ZIM.getInstance()!.createRoom(_roomInfo, _config))
          .catchError((e) {
    throw PlatformException(code: e.code.toString(), message: e.message);
  });

  return jsObjectToMap(result);
}