getOrCreateWorkspaceScope method

ZenithTenantScope getOrCreateWorkspaceScope(
  1. String workspaceId
)

Returns the existing workspace scope for workspaceId, or creates one.

Implementation

ZenithTenantScope getOrCreateWorkspaceScope(String workspaceId) {
  if (isDisposed || isClosing) throw StateError('User scope is closing');
  return _workspaces.putIfAbsent(
    workspaceId,
    () => ZenithTenantScope(workspaceId),
  );
}