Space class

A hierarchical container for organizing items in Kumiho.

Spaces form the folder structure within a project. They can contain other spaces (subspaces) and items, allowing you to organize assets in a meaningful hierarchy. The SDK exposes navigation helpers here so callers can traverse the project tree without importing any of the generated protobuf code.

final assets = await project.createSpace('assets');
final models = await assets.createSpace('models');
final textures = await assets.createSpace('textures');

// Create items
final chair = await models.createItem('chair', 'model');

// Navigate hierarchy
final parent = await models.getParentSpace();  // Returns assets
Inheritance

Constructors

Space(SpaceResponse response, dynamic client)
Creates a Space from a protobuf response.

Properties

author ↔ String
The user ID who created the space.
latefinal
client → dynamic
The client instance for making API calls.
finalinherited
createdAt ↔ String?
ISO timestamp when the space was created.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
kref → String
Gets the kref for this space.
no setter
metadata ↔ Map<String, String>
Custom metadata key-value pairs.
latefinal
name ↔ String
The name of this space (last component of path).
latefinal
parent → Future
Gets the parent of this space.
no setter
path ↔ String
The full path of the space (e.g., "/project/assets").
latefinal
project → Future
Gets the parent project of this space.
no setter
projectName → String
Gets the project name from the path.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type ↔ String
The type of space ("root" for project-level, "sub" for nested).
latefinal
username ↔ String
Display name of the creator.
latefinal

Methods

createBundle(String bundleName, {Map<String, String>? metadata}) → Future<Bundle>
Creates a new bundle within this space.
createItem(String itemName, String kind) → Future<Item>
Creates a new item within this space.
createSpace(String spaceName) → Future<Space>
Creates a new subspace within this space.
delete({bool force = false}) → Future<void>
Deletes this space.
getChildSpaces({bool recursive = false, int? pageSize, String? cursor}) → Future<List<Space>>
Gets all child spaces of this space.
getItem(String itemName, String kind) → Future<Item>
Gets an item by name and kind from this space.
getItems({String? kindFilter, String? nameFilter, int? pageSize, String? cursor, bool includeDeprecated = false}) → Future<PagedList<Item>>
Gets all items in this space.
getParentSpace() → Future<Space?>
Gets the parent space of this space.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
updateMetadata(Map<String, String> metadata) → Future<void>
Updates metadata for this space.

Operators

operator ==(Object other) → bool
The equality operator.
inherited