addChildRoom method

Future<String> addChildRoom(
  1. String roomId,
  2. bool suggested
)

add the following as a child space and return event id of that event flag as suggested or not

Implementation

Future<String> addChildRoom(
  String roomId,
  bool suggested,
) {
  final tmp1 = roomId;
  final tmp5 = suggested;
  var tmp0 = 0;
  var tmp2 = 0;
  var tmp3 = 0;
  var tmp4 = 0;
  var tmp6 = 0;
  tmp0 = _box.borrow();
  final tmp1_0 = utf8.encode(tmp1);
  tmp3 = tmp1_0.length;

  final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
  final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
  tmp2_1.setAll(0, tmp1_0);
  tmp2 = tmp2_0.address;
  tmp4 = tmp3;
  tmp6 = tmp5 ? 1 : 0;
  final tmp7 = _api._spaceAddChildRoom(
    tmp0,
    tmp2,
    tmp3,
    tmp4,
    tmp6,
  );
  final tmp9 = tmp7;
  final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
  final tmp9_1 = _Box(_api, tmp9_0, "__Space_add_child_room_future_drop");
  tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
  final tmp8 = _nativeFuture(tmp9_1, _api.__spaceAddChildRoomFuturePoll);
  return tmp8;
}