createSpace method

Future<SpaceResponse> createSpace(
  1. String parentPath,
  2. String spaceName, {
  3. bool existsError = true,
})
inherited

Creates a new space within a project or parent space.

parentPath is the path where the space will be created (e.g., '/project-name' or '/project-name/parent-space'). spaceName is the name of the new space. existsError controls whether to throw an error if the space already exists (default: true).

Implementation

Future<SpaceResponse> createSpace(
  String parentPath,
  String spaceName, {
  bool existsError = true,
}) async {
  final request = CreateSpaceRequest()
    ..parentPath = parentPath
    ..spaceName = spaceName
    ..existsError = existsError;
  return stub.createSpace(request, options: callOptions);
}