loadProjectId static method

String? loadProjectId(
  1. String projectPath
)

Load project ID from directory config

Implementation

static String? loadProjectId(String projectPath) {
  try {
    final configFile = File(_getConfigPath(projectPath));
    if (!configFile.existsSync()) {
      return null;
    }

    final content = configFile.readAsStringSync();
    final json = jsonDecode(content) as Map<String, dynamic>;
    return json['projectId'] as String?;
  } catch (e) {
    // If file doesn't exist or is invalid, return null
    return null;
  }
}