CloudBaseCore constructor
CloudBaseCore(
- CloudBaseConfig config
CloudBaseCore(?)
Implementation
factory CloudBaseCore(CloudBaseConfig config) {
String? envId = config.envId;
// 没有缓存
if (envId == null && _cache[envId] == null) {
throw new CloudBaseException(
code: CloudBaseExceptionCode.INVALID_PARAM,
message: '环境 $envId 未初始化 CloudBaseCore 实例,请传入 envId');
}
return _cache.putIfAbsent(envId!, () => CloudBaseCore._internal(config));
}