1
This commit is contained in:
19
lib/config/env.dart
Normal file
19
lib/config/env.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
///环境配置
|
||||
class Config {
|
||||
Config._();
|
||||
|
||||
///获取环境
|
||||
static String getEnv() {
|
||||
const env = String.fromEnvironment('ENV', defaultValue: 'dev');
|
||||
return env;
|
||||
}
|
||||
|
||||
///获取接口地址
|
||||
static String baseUrl() {
|
||||
if (getEnv() == 'dev') {
|
||||
return 'https://skin-api.curain.ai/api';
|
||||
} else {
|
||||
return 'https://skin-api.curain.ai/api';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user