ApiClient constructor
ApiClient({
- required AuthManager authManager,
- required String projectId,
Implementation
ApiClient({required this.authManager, required this.projectId})
: serverUrl = Platform.environment['OPENCI_SERVER_URL'] ?? '' {
if (serverUrl.isEmpty) {
throw StateError('OPENCI_SERVER_URL environment variable is required.');
}
_chopperClient = createChopperClient(
baseUrl: serverUrl,
authManager: authManager,
);
_apiService = _chopperClient.getService<OpenCiApiService>();
}