getChildSpaces method
Gets all child spaces of this space.
When recursive is true, the server traverses the entire subtree and
returns every descendant in a single RPC—no client-side fan-out. The
optional pageSize and cursor mirror the server-side paging
semantics. This mirrors Project.getSpaces to keep navigation
consistent.
final children = await assets.getChildSpaces();
Implementation
Future<List<Space>> getChildSpaces({
bool recursive = false,
int? pageSize,
String? cursor,
}) async {
final spaceResponses = await client.getChildSpaces(
path,
recursive: recursive,
pageSize: pageSize,
cursor: cursor,
);
return spaceResponses.map<Space>((s) => Space(s, client)).toList();
}