getProject static method

ServerPodProject? getProject({
  1. String? currentPath,
  2. bool forceReload = false,
})

Get the current ServerPod project

Caches the result for subsequent calls.

Implementation

static ServerPodProject? getProject({String? currentPath, bool forceReload = false}) {
  if (forceReload) {
    _cachedProject = null;
  }

  _cachedProject ??= ServerPodProject.detect(currentPath);
  return _cachedProject;
}